Advertisement
Anukun_Lucifer

RemoteHandler (Script)

Feb 19th, 2023
1,000
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.55 KB | Gaming | 0 0
  1. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  2. local PlaceStructure = ReplicatedStorage:WaitForChild("PlaceStructure")
  3. local Structures = ReplicatedStorage:WaitForChild("Structures")
  4.  
  5. PlaceStructure.OnServerInvoke = function(Player,StructureName,StructureCFrame)
  6.    
  7.     local crafted
  8.     local realStructure = Structures:FindFirstChild(StructureName):Clone()
  9.    
  10.     if realStructure then
  11.         realStructure.CFrame = StructureCFrame
  12.         realStructure.Parent = game.Workspace
  13.         crafted = true
  14.     else
  15.         crafted = false
  16.     end
  17.    
  18.     return crafted
  19. end
Tags: Roblox
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement