#i really dont know why is my currency system not working yet.
92 messages · Page 1 of 1 (latest)
When you play the game the stud count needs to apear in the leader stats
@half nexus
on line 11 add
print(Player:GetPlayers())
and then tell me what it returns
@ionic briar
bugs make me super mad sometimes
perhaps we try adding in
print(player)
inside the function to see
- if it gets called
and 2. if it has the player
alr lemme see
wait where do i put print(player)?
first line of the function
ok
do studs.Parent = leaderstats, sometimes the second of argument of Instance.new dont take it as parent(its just me maybe)
lemme try
it should, yet you should still do that as it is faster then doing it in 1 line
yes luau is amazing, the one which takes more lines to write is the faster of the 2
fr
in line 8 right?
just manual parent it using property
isntead argument
create new line
and yes
line 8
ight
you mean 4 and 7 I hope
do it also for leaderstats, cuz eh, God knows
using this version of the script as reference
alr
(maybe it would be a good idea to send a screenshot of the current script so we get the lines right)
same
ok
local Player = game:GetService("Players")
local function setupPlayerData(player: player)
local leaderstats.Parent = Instance.new("Folder", player)
leaderstats.Name = "leaderstats"
local studs.Parent = Instance.new("IntValue", player)
studs.Name = "Studs"
studs.Value = 0
end
print(Player:GetPlayers())
Player.PlayerAdded:Connect(setupPlayerData)
thanks for not formatting it in a language box
omg sorry
i forgot how to do that
OH
OH
MAN
U BLIND
xd
I also
u parent the studs
to player
not
leaderstats
oooh
** You are now Level 11! **
@ionic briar
local Players = game:GetService("Players")
local function setupPlayerData(plr :Player)
local LS = Instance.new("Folder")
LS.Parent = plr
LS.Name = "leaderstats"
local S = Instance.new("IntValue")
S.Parent = LS
S.Name = "Studs"
S.Value = 0
end
Players.PlayerAdded:Connect(setupPlayerData)
retyped your script and fixed it
ight
you can change the variables, I just got lazy while typing to function 😆
local Players = game:GetService("Players")
local function setupPlayerData(player: player)
local leaderstats = Instance.new("Folder", player)
leaderstats.Name = "leaderstats"
local studs = Instance.new("IntValue", leaderstats)
studs.Name = "Studs"
studs.Value = 0
end
Players.PlayerAdded:Connect(setupPlayerData)
omg ty guys
it works!!
ty yall so much
lol
and im the one and only noob scripter python