So I was testing out my script and there was some type of a problem joining in the game where the script doesn't load up whenever a player joins a server until they reset for it to work. Although it works sometimes, it doesn't do it always.
game.Players.PlayerAdded:connect(function(player)
local currentlevel = player:WaitForChild("leaderstats"):WaitForChild("Level")
player.CharacterAdded:connect(function(char)
if currentlevel.Value >= 2 then
script.Parent.Parent.StarterGui.Stamina.Handler.Disabled = false
end
if currentlevel.Value >= 3 then
script.Parent.Parent.StarterGui.DoubleJump.Disabled = false
end
if currentlevel.Value >= 4 then
player.Backpack.ScriptStorage.PlayerMovement.ForwardDash.Disabled = false
end
char.Humanoid.Died:connect(function()
if currentlevel.Value >= 2 then
script.Parent.Parent.StarterGui.Stamina.Handler.Disabled = false
end
if currentlevel.Value >= 3 then
script.Parent.Parent.StarterGui.DoubleJump.Disabled = false
end
if currentlevel.Value >= 4 then
player.Backpack.ScriptStorage.PlayerMovement.ForwardDash.Disabled = false
end
end)
end)
end)

3 comments
You are using local script?
No it's in the ServerScriptService as a normal Script
You cannot access playergui with server script.