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

My destroy door script isn't working Please send help. Do you have any idea what's going on anyone?

It's a script that moves a door out of the way after 3 minutes. It's suppost to count down on the surface gui above the button. It isn't.

Button = script.Parent.Parent.Parent.Button
Door = script.Parent.Parent.Parent.Parent.Door
Text = script.Parent.TextLabel.Text
function click()
	local num = 180
	Text = num
	for i = 1, num do
		num = num - 1
		print(Text)
		wait(1)
	end
	for i = 1,420 do
	Door.CFrame = Door.CFrame *CFrame.new(-.01, 0 ,0)
	wait(.01)
	end
	end
	script.Parent.Parent.Parent.Button.CD.mouseClick:connect(click)

1 answer

✓ Accepted answer
Button = script.Parent.Parent.Parent.Button
Door = script.Parent.Parent.Parent.Parent.Door
Text = script.Parent.TextLabel.Text
function click()
    local num = 180
    Text = num
    for i = 1, num do
        num = num - 1
	script.Parent.TextLabel.Text = tostring(num) --Assuming textLabel is valid!
        print(Text)
        wait(1)
    end
    for i = 1,420 do
    Door.CFrame = Door.CFrame *CFrame.new(-.01, 0 ,0)
    wait(.01)
    end
    end
    script.Parent.Parent.Parent.Button.CD.mouseClick:connect(click)

Going off your issue, I'm assuming you never set the text. omething to note: "script.Parent.TextLabel.Text" Using that as a variable will not change by doing Text = "Blank"

Anyways, this should work. I set the TextLabel to update to Num

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