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

"BasePart is not a valid member of Workspace" Moving a script from Lightning to Workspace?

Asked by 8 years ago

It probably is a naming issue.

function OnClick()
    script.Parent.Parent.Parent.Parent.Lighting.TrainScript:Clone().Parent = game.Workspace
end

script.Parent.ClickDetector.MouseClick:connect(OnClick)

02:59:02.792 - BasePart is not a valid member of Workspace

02:59:02.793 - Script 'Workspace.TrainScript', Line 1

02:59:02.794 - Stack End

Answer this question