So I made a short script so you get a certain GUI when you join the game. But I get this error.
12:26:04.771 - Workspace.HandToHandle:4: attempt to index local 'User' (a nil value)
12:26:04.772 - Stack Begin
12:26:04.772 - Script 'Workspace.HandToHandle', Line 4
12:26:04.773 - Stack End
And my script is:
game.Players.PlayerAdded:Connect(function(plr)
local Players = game:GetService("Players")
local User = Players:FindFirstChild(plr)
local UserGUI = User:FindFirstChild("PlayerGui")
local Handto = script.Handtoui:Clone(UserGUI)
end)
No errors in the script so I don't know what I did wrong here.

1 comment
Thank you!