Hey there!
How would I modify this script to detect when the text is displaying 100 or higher? I’m trying to use this to start a fire on the part when it reaches that number, but it doesn’t do anything.
Script:
local Text = script.Parent
local fire = Text.Parent.Parent.Fire
Text.Text = 0
while true do
if workspace.Button.Value.Value == true then
Text.Text = Text.Text + 1
wait(0.4)
else
Text.Text = Text.Text + 1
wait(0.1)
end
end
I don’t think you can check the text from the server, you need to use remote events to send an arg from the client to the server. Edit: Also a screenshot would actually help.
This is a bit offtopic, but instead of using while true do you could do
game.workspace.Button.Value.Changed:Connect(function()
local Text = script.Parent
local fire = Text.Parent.Parent.Fire
Text.Text = 0
if workspace.Button.Value.Value == true then
Text.Text = Text.Text + 1
wait(0.4)
else
Text.Text = Text.Text + 1
wait(0.1)
end
end)