So I made a script to move a part to a different place, but it comes up with "attempt to call a nil value". What does this mean and where does it come from???
function onClick(mouse)
local character = game.Workspace.Model.Stage1.L
if character and character:findFirstChild("Humanoid") then
local b = Instance.new("BodyPosition")
b.position = Vector3.new(43.65, 5.2, 57.4)
b.maxForce = Vector3.new(500000000, 500000000, 500000000)
b.Parent = character.L
wait(3)
b.Parent = nil
end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
