So my GUI is working perfectly fine in studio, but not in game. the Server log Error in game reads:
Workspace.Part.Script:5: attempt to index field "LocalPlayer" (a nil value)
Here is my script
local Gui = script.Parent.CardGiverGui
function onClicked()
local GUI = Gui:Clone()
GUI.Parent = game.Players.LocalPlayer.PlayerGui
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
