BobMe

BrickYeeterGlobal

Jul 2nd, 2020
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. local remote = nil
  2. local player = owner
  3.  
  4. if player:FindFirstChild("Yet") == nil then
  5. remote = Instance.new("RemoteEvent",player)
  6. remote.Name = "Yet"
  7. else
  8. remote = player:FindFirstChild("Yet")
  9. end
  10.  
  11. remote.OnServerEvent:Connect(function(plr,mode,part,data)
  12. if mode == "anchor" then
  13. part:SetNetworkOwner(plr)
  14. part.Anchored = true
  15. elseif mode == "unanchor" then
  16. print(data)
  17. --game:GetService("RunService").Heartbeat:Wait(1/32)
  18. part.Velocity = data
  19. part.Anchored = false
  20. elseif mode == "update" then
  21. part.CFrame = data
  22. elseif mode == "spawnpart" then
  23. local b = Instance.new("Part",workspace)
  24. b.CFrame = plr.Character.Head.CFrame * CFrame.new(0,0,-5)
  25. b.Material = Enum.Material.Brick
  26. b.Color = Color3.fromRGB(163,163,163)
  27. b.Size = Vector3.new(4,4,4)
  28. end
  29. end)
Add Comment
Please, Sign In to add comment