So I wrote out this code, but for some reason it won't work.
game.Players.PlayerAdded:Connect(function()
local Player = game.Players.LocalPlayer
if Player:IsInGroup(4324101) then
Player.PlayerGui.Spawn.Enabled = true
end
end)
Any ideas as to why? The script is a local script and no output errors.

3 comments
PlayerAdded won't fire for the local player because by the time the script is locally executed the player has already joined the game. Why do you need line 1 and 6? Remove them.
You do realize this could have been done in a single statement:
Player.PlayerGui.Spawn.Enabled = Player:IsInGroup(4324101)Still not secure though, exploiters can easily enable it even if they're not in the group. Can't find a way to stop them.Oof, thanks!