script.Parent.ClickDetector.MouseClick:connect(function(playerWhoClicked)
local num = playerWhoClicked.PlayerGui.ScreenGui.Frame.rockSec.num.Text
playerWhoClicked.PlayerGui.ScreenGui.Frame.rockSec.num.Text = num + 1
print(playerWhoClicked.PlayerGui.Child)
end)
Why does this work fine in Roblox Studio but in game it gives me an error:
"ScreenGui is not a valid member of PlayerGui"

1 comment
The server can't modify PlayerGui.