Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

This works in test mode, but no in-game?

OK so I have a GUI called "greenpower" and It's current Parent is ServerStorage.

I also have a tool and when i activate it (clicking) the GUI is supposed to move to the Player's PlayerGui.

This works just fine in test mode, but in actual game it doesn't.

LocalScript:

local player = game.Players.LocalPlayer
local power = game.ServerStorage:WaitForChild("greenpower")
local plrgui = player:WaitForChild("PlayerGui")
script.Parent.Activated:connect(function()
	power:Clone().Parent = plrgui
	
end)

Help?

1 comment

2

Local scripts do not have access to the server storage, put the gui some where the player can access it such as replicated storage.

1 answer

✓ Accepted answer

I'm not an expert but I'm pretty sure Local scripts doesn't have permissions to access the Replicated Storage, if you go into developer console(F9) in play mode you will definitely see the error there, thus fixing it shouldn't be that hard.

1 comment

0

thanks

This discussion is preserved as it was. New answers, comments, and votes are closed.