#How do you make a part give a currency?
17 messages · Page 1 of 1 (latest)
whats wrong with people here...
show code?
what da....
script.Parent.Touched:Connect(function(part)
local plr = game.Players:GetPlayerFromCharacter(part.Parent)
if plr then
plr.leaderstasts.Monney.Value += 10
end
end)
game.Players.PlayerAdded:Connect(function(plr)
local le = Instance.new("Folder",plr)
le.Name = "leaderstats"
local le = Instance.new("NumberValue",le)
le.Name = "Monney"
end)
he just asked to increse the monney wen tuching a part
not how to make saving leaderstats spamming the output
Probably because .Hearbeat thats why the speed is adding up so fast
Yeah
Maybe replace it with wins.Changed?
while task.wait(1) do
plr.leaderstasts.Monney.Value += 1
end
the whole script would look like this
game.Players.PlayerAdded:Connect(function(plr)
local le = Instance.new("Folder",plr) --Create leaderstats
le.Name = "leaderstats"
local Monney = Instance.new("NumberValue",le) --create Currency
Monney.Name = "Monney"
while task.wait(1) do --every second
Monney.Value += 1 --increase currency by 1
end
end)
it increases the Monney every second by 1
the guy said it was supposed to be 1+ speed per win though?
just do
win +=1
speed += 1
Huh??
