how do I make a player variable? Like how everyone has a different health value. Server variable example is: How long the server has been up Player variable example is: How long a player has been on the server.
I’m asking this because I want to make everyone have a different gold value.
Edit: Sorry for the vagueness. So what I want is like a leaderboard system, like what PainterTable Said.
I think what you're asking is a leaderboard system. with this way you could check how long a player is on the server this session and how much gold he has.
Example leaderboard
local function onPlayerJoin(player) local leaderstats = Instance.new("Folder") leaderstats.Name = "leaderstats" leaderstats.Parent = player local gold = Instance.new("IntValue") gold.Name = "Gold" gold.Value = 0 gold.Parent = leaderstats local.time = Instance.new("IntValue") time.Name = "Time" time.Value = 0 time.Parent = leaderstats end
With this you have a folder in each Player with 2 Stats called gold and time. Now you could also do an easy function to make the IntValue in Time go up 1 every second. If you do that you can check with print how long the player is on the server or make a GUI and display it there. I just gave you the beginning.
Example of Time Function
while true do wait(1) time.Value = time.Value + 1 end
(I dont know if this works, Roblox is down right now) But if this works you need to place it in the same script, right under my Lines up there.