I've been trying to work out and come across possible explanations for this issue but I can't seem to identify the error.
I get the error, "Gift is not a valid member of PlayerGui".
Here is my script it is erroring in. Line 5. The script is also in Workspace as it is a RemoteEvent script.
game.ReplicatedStorage.Events.Present.OnServerEvent:Connect(function()
-- Any code will run when RemoteEvent is triggered/fired
for i,v in pairs(game.Players:GetPlayers()) do
v.leaderstats.Points.Value = v.leaderstats.Points.Value + 5000
v.PlayerGui.Gift.cash.Visible = true
v.PlayerGui.Gift.present.Visible = false
game.Workspace.CoinSound:Play()
v.leaderstats.gift.Value = true
wait(0.2)
v.PlayerGui.Gift.cash.TextSize = 40
wait(0.2)
v.PlayerGui.Gift.cash.TextSize = 48
wait(2)
v.PlayerGui.Gift.cash.Visible = false
v.PlayerGui.Christmas.TextLabel.Visible = false
end
end)
Anyone know any possible explanations to this error?
Here is also a screenshot of the PlayerGui and the Gui's inside of it.
https://i.gyazo.com/20540f5b045018ba14e6a05e7c910cbf.png
Thanks, TheOnlySmarts.

7 comments
you cant access GUI objects on the server
so do that stuff on the client
so would i use invokeserver
no..
use :FireServer() on a remote event
RemoteFunctions are for RETURNING values
Oh, but when I changed it to OnClientEvent it still didnt work. Could you answer the question as it'd be easier. Thanks!