Hi im working on a game where you have to run away from a wall whilst doging obstacles but i am really stuck with sorting out the pusher block this is my code so far:
local timing = 10
gui = script.Parent.Parent.door.SurfaceGui.TextLabel
gui.Text = "10..."
for i = 0,9 do
wait(1)
timing = timing - 1
gui.Text = timing.."..."
end
game.Workspace.door.CanCollide = false
gui.Text = "GO!!!"
while true do
if script.Parent.CFrame >= script.Parent.Parent.Backer.CFrame then
script.Parent.CFrame = CFrame.new(60.5, 31, -39) break
end
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(-1,0,0)
wait(0)
end
the for loop is to change the value on the GUI but its working fine its just the door right now all i have oticed is the if statement (p.s. giving me any improvements to the script will help thanks and i keep getting this error " Walkspeed 25.Pusher.Move:29: attempt to compare two userdata values" if this code cannot be figured out i want to know a way i could make it so the pusher resets for each minigame) if it helps i have opened my place and left the link here

2 comments
thx and the block doesnt go fast at all with wait(0)
didn't work :/