How can I make a timer that will show the timer and move two blocks?
Asked by
3 years ago Edited 3 years ago
I'm trying to make a script that'll show the timer on a block using a SurfaceUI and then when the timer runs out, a door opens(Two blocks split apart from each other). But while trying to get the time script to work, nothing happened. The timer doesn't start at all.
This is my script
1 | local seconds = script.Parent.Parent.Timer |
3 | script.Parent.Text = seconds.Value |
5 | for i = 1 , seconds.Value do |
7 | seconds.Value = seconds.Value - 1 |
8 | script.Parent.Text = seconds.Value |
This script is a local script in the part of the block I want to use as a timer
I don't have a script for opening the doors and I'd like to ask how exactly I'm supposed to do that while I'm here.
Edit: for future users stumbling upon this post I just want to say that my mistake is that I used a local script for my code. If you don't want to use remote events then in order to interact with other objects in different places you need to use regular scripts.