Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = game.Players.LocalPlayer
- local beam = script:WaitForChild("Beam"):Clone()
- local function pathToPart(beam, a0, part) --Function to make making paths easier
- local a1 = part:FindFirstChildOfClass("Attachment")--Find the attachment in the part
- if a1 then
- beam.Attachment0 = a0
- beam.Attachment1 = a1
- else
- warn("No attachment was inserted into "..part:GetFullName())
- end
- end
- plr.CharacterAdded:Connect(function(char)--Every time player respawns, connect beam again
- local root = char:WaitForChild("HumanoidRootPart")
- local a0 = root:WaitForChild("RootRigAttachment")
- pathToPart(beam, a0, workspace.Canrinel:WaitForChild("HumanoidRootPart"))
- beam.Parent = char
- end)
Advertisement
Add Comment
Please, Sign In to add comment