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

Workspace is not a valid member of Script.help?

Asked by 7 years ago

this is the error i get on my script "Workspace is not a valid member of Script" this is my script

local players = game.Players:GetChildren() local maps = game.Lighting:GetChildren() local currentmap = game.Workspace:WaitForChild("CurrentMap") local chosenmap = script.Workspace:WaitForChild("ChosenMap") local spawner = game.Workspace:WaitForChild("Spawn") -- Change "Spawn" to your spawn name local choices = {}

why do i get this error can you fix it please this will save me

1 answer

Log in to vote
0
Answered by 7 years ago

It is most probably the fact that you did script.Workspace either do game.Workspace or workspace Your script should probably look like this

local players = game.Players:GetChildren() 
local maps = game.Lighting:GetChildren() 
local currentmap = game.Workspace:WaitForChild("CurrentMap") 
local chosenmap = game.Workspace:WaitForChild("ChosenMap") 
local spawner = game.Workspace:WaitForChild("Spawn") -- Change "Spawn" to your spawn name 
local choices = {}

These are the only errors I can see. If you could explain your script a bit more it would help me answer it more better :D

0
thank you so much for your help i fixed that error with your help :D ....you made me happy I have been looking for hours for solution you helped :D ..now i have another error it says Infinite yield possible on 'Workspace:WaitForChild("ChosenMap")'....that would be amazing if you know what can i do for this one...my script is about teleporting players inside the game from lobby to the map..thanks Romy_99 6 — 7y
0
just do game.Workspace:WaitForChild("ChosenMap" , 50) DumbKickButt5588 167 — 7y
0
wow thank you so so much you are the best it worked :o i hope you have an amazing day....thanks so much for helping Romy_99 6 — 7y
0
np if you need any more help just message me or comment on this? DumbKickButt5588 167 — 7y
Ad

Answer this question