Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Argument 1 missing or nil?

robu = game.Players.Player:GetFullName()

while true do
	script.Parent.Text = "Robux Ammount: "..game.Players:FindFirstChild().leaderstats.ROBUX
wait()
end

why does it not work? it's soppost to make the textbutton display the ammount of robux the player has.

2 comments

0

I think you have an infinite loop, and please use a code block.

0

Editted for: codeblock.

1 answer

You didn't use robu at all? Anyways;

local player=game.Players.LocalPlayer

while true do
	script.Parent.Text="ROBUX Amount: "..player:FindFirstChild("leaderstats").ROBUX
	wait()
end

Even better thing to do would be;

local player=game.Players.LocalPlayer
local robux=player:FindFirstChild("leaderstats").ROBUX

robux.Changed:connect(function(val)
	script.Parent.Text="ROBUX Amount: "..val
end)

1 comment

0

yeah, I was gonna use robu but it was not working as I wanted it too ;/ But thanks!

This discussion is preserved as it was. New answers, comments, and votes are closed.