hey! ive been trying to make a very basic admin panel gui with scripts and stuff
only problem is that the LocalScript wont work properly and puts out a error that goes by this:
opendoor is not a valid member of ServerScriptService “ServerScriptService”
heres the script for the localscript
while task.wait(3) do
if script.Parent.Text == "door.open" then
game.ServerScriptService.opendoor.Enabled = true
script.Parent.Parent["Cooldown text"].Visible = true
game.ServerScriptService.opendoor.Enabled = false
script.Parent.Text = "Standing by..."
script.Parent.Parent["Cooldown text"].Visible = false
yes i know, theres prob a easier and a better way to make something like this but yeah
the “opendoor” is a script in ServerScriptService
and the script there is just
game.Workspace.door2.Script.Enabled = true
i hope someone can help, thanks
It says that the ServerScriptService does not have a child/member by the name
opendoor, are you sure that it’s still there when the code runs? Maybe you’ve made a spelling mistake?
A screenshot of your explorer would be helpful.
the opendoor is in the ServerScriptService, it doesn’t have any scripts that change its parent or anything. i dont get it why it plays this error when everything seems to be good to go
my only solution would be that the localscript messes something up
Oh I see the issue.
LocalScripts do not have access to anything under ServerScriptService.
Also btw if you change something in a local script it only happens locally, so the server won’t run the opendoor script because it doesn’t know that a user changed the Enabled property.
ah yes makes sense, thanks for the help
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.