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

Did roblox change something or have I lost all my scripting experience?

This may sound dumb, but why doesn't the text change? (Only changes once)

while true do
	wait(1)
	script.Parent.Text = script.Parent.Amount.Value
end

5 comments

0

does script.parent.amount's value change?

0

Yeah

0

Everytime you die it adds 1 to the value.

0

is this a server script? where is it? do you change the amount.Value in a local or server script?

0

me to

1 answer

if script.ClassName == "LocalScript" then
game:GetService("RunService").Stepped:connect(function()

    script.Parent.Text = tostring(script.Parent.Amount.Value)
end)

else warn("USE A LOCALSCRIPT")

end

1 comment

0
  1. use :Connect not :connect. 2. Use .Changed event instead of RunService 3. The Event should be outside of the conditional statement, it's not good to place a event inside a conditional statement (a simple fix is to change the event)

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