Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I couldn't close the script?

Asked by 3 years ago

I bought a script from a friend of mine, this script is a script that shows where to go with an arrow but this script shouldn't always show where to go, but my script shows I want these arrows to go up when I touch a piece, but I couldn't close it anyway, please help.script starterplayerscripts also available

script of arrows: local plr = game.Players.LocalPlayer --Current Player local beam = script:WaitForChild("Beam"):Clone() --Create a clone of our template

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 --If we found one, attach it beam.Attachment0 = a0 --Set attachments beam.Attachment1 = a1 else --If there isn't one, let the scripter know 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") --Get humanoid root part local a0 = root:WaitForChild("RootRigAttachment") --Wait for root rig attachment pathToPart(beam, a0, workspace:WaitForChild("Part")) --Set attachments beam.Parent = char --Parent the beam to the new character end)

Answer this question