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

Where do starterScripts go?

Asked by 8 years ago

So i have this script wich is suposed to enable a script orinaly in StarterScripts. However a player does not have that in roblox player?

pl = script.Parent.Parent.Parent.Parent
script.Parent.MouseButton1Click:connect(function ()

    pl.StarterPlayer.StartTheGame.Disabled = false --this
    --pl.PlayerScripts
    --pl.StarterScripts Neither of these three work

    script.Parent:remove()
end)

1 answer

Log in to vote
0
Answered by 8 years ago

Players do not have a folder in them called 'StarterPlayer'. What you are looking for is called 'StarterGear'.

'StarterPlayer' is a service, a child of 'game'.

http://wiki.roblox.com/index.php/Place_hierarchy

EDIT:

You won't be able to do it properly, your hierarchy needs to be this:

  • StarterPlayer
    • StarterPlayerScripts
      • Script (StartTheGame) (this puts the script into a player when they join)

Your script should be:

pl = script.Parent.Parent.Parent.Parent
script.Parent.MouseButton1Click:connect(function ()
    pl.StartTheGame.Disabled = false --this

    script.Parent:remove()
end)

0
What i am actually looking for is the StarterPlayer.StarterPlayerScripts. martim02 9 — 8y
Ad

Answer this question