Advertisement
MandB

Objective Maker

Sep 29th, 2021
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. --ServerScriptService
  2.  
  3. wait(10)
  4.  
  5. --//Varibles
  6.  
  7. local ArrowEvent = game.ReplicatedStorage.ArrowEvent
  8.  
  9. --Main
  10.  
  11. ArrowEvent:FireAllClients(game.Workspace.Part1,true)
  12. wait(5)
  13. ArrowEvent:FireAllClients(game.Workspace.Part1,false)
  14.  
  15. wait(5)
  16.  
  17. ArrowEvent:FireAllClients(game.Workspace.Part2,true)
  18. wait(5)
  19. ArrowEvent:FireAllClients(game.Workspace.Part2,false)
  20.  
  21. wait(5)
  22.  
  23. ArrowEvent:FireAllClients(game.Workspace.Part3,true)
  24.  
  25. --StarterPlayerScripts
  26.  
  27. local Player = game.Players.LocalPlayer
  28. local Character = Player.Character or Player.CharacterAdded:Wait()
  29. local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
  30.  
  31. local Beam = script:WaitForChild("Beam"):Clone()
  32.  
  33. local function CreateBeam(Beam,Attachment0,Part)
  34. local Attachment1 = Part:FindFirstChild("Attachment")
  35.  
  36. if Attachment1 then
  37. Beam.Attachment0 = Attachment0
  38. Beam.Attachment1 = Attachment1
  39. end
  40. end
  41.  
  42. game.ReplicatedStorage.ArrowEvent.OnClientEvent:Connect(function(Part,Value)
  43. if Value == true then
  44. local Attachment0 = HumanoidRootPart:FindFirstChild("RootRigAttachment")
  45. CreateBeam(Beam,Attachment0,Part)
  46. Beam.Parent = Character
  47. else
  48. Beam:Remove()
  49. end
  50. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement