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

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

Asked by 8 years ago

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?

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. User#5423 17 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

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.

0
thanks Lukeisbossman64 73 — 8y
Ad

Answer this question