i'm making a starting line system for my game, and i want to add a gui that gets enabled for everyone who is in a certain zone, the way i'm doing this is by using a Vector3.new so the part moves to the zone, then it triggers a script inside of a gui for every player that hit it (then goes back to where it was after .5, but i put it at .2 for testing purposes), the script does a simple count down from 5, then says start.

however, when i say "start" (which runs the main script for the starting line); the brick doesn't move again, it just stays underground (which is where i told it to move after it has triggered the gui's script for the players in the zone)

is there a way to make the brick move for every time the script is triggered? or should i find another way?

code for the script's part that makes the brick move

local part = game.Workspace.detector

part.Position = Vector3.new(2923.907, 8, 1690.916)
wait(.2)
part.Position = Vector3.new(2923.907, -10, 1690.916)

(i can leave any code samples in an edit if it's needed)

is there a better way to execute a script for players in a zone? that could also help too

thanks!

1 comment

0

Use remote events, and the event called MouseButton1Up for the Gui.