game.Players.CharacterAdded:Connect(function(player)
if player:FindFirstChild("Charge") then
player.Charge.Value = 100
else
local Charge = Instance.new("NumberValue")
Charge.Name = "Charge"
Charge.Value = 100
Charge.Parent = player
end
if player:FindFirstChild("Engine") then
player.Engine.Value = false
else
local Engine = Instance.new("BoolValue")
Engine.Name = "Engine"
Engine.Value = false
Engine.Parent = player
end
end)
Do a script with PlayerAdded and CharacterAdded into it and then print at every event, you will see that at first entrance on server only one print will show
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function()
if player:FindFirstChild("Charge") then
player.Charge.Value = 100
else
local Charge = Instance.new("NumberValue")
Charge.Name = "Charge"
Charge.Value = 100
Charge.Parent = player
end
if player:FindFirstChild("Engine") then
player.Engine.Value = false
else
local Engine = Instance.new("BoolValue")
Engine.Name = "Engine"
Engine.Value = false
Engine.Parent = player
end
end)
end)
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function()
if player:FindFirstChild("Charge") then
player.Charge.Value = 100
else
local Charge = Instance.new("NumberValue")
Charge.Name = "Charge"
Charge.Value = 100
Charge.Parent = player
end
if player:FindFirstChild("Engine") then
player.Engine.Value = false
else
local Engine = Instance.new("BoolValue")
Engine.Name = "Engine"
Engine.Value = false
Engine.Parent = player
end
end)
end)