Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Argument 1 missing or nil?

Asked by 8 years ago
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.

0
I think you have an infinite loop, and please use a code block. TheHospitalDev 1134 — 8y
0
Editted for: codeblock. M39a9am3R 3210 — 8y

1 answer

Log in to vote
5
Answered by 8 years ago

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)
0
yeah, I was gonna use robu but it was not working as I wanted it too ;/ But thanks! Dominus113 0 — 8y
Ad

Answer this question