pls i have this script which keeps crashing my studio and i dont know how to fix it it is a loop that moves a part around a line its for my game pls help me
1 | part = game.Workspace.skate |
2 |
3 | while true do |
4 | part.CFrame = part.CFrame*CFrame.new( 1 , 0 , 0 ) |
5 | part.BrickColor = BrickColor.random() |
6 | print ( "debug" ) |
7 | end |
1 | part = game.Workspace.skate |
2 |
3 | while true do |
4 | part.CFrame = part.CFrame*CFrame.new( 1 , 0 , 0 ) |
5 | part.BrickColor = BrickColor.random() |
6 | print ( "debug" ) |
7 | wait() |
8 | end |
You have a while true do loop which is an infinite loop. ALL infinite loop needs wait() <- doesnt matter how many sec. else you will crash
1 | part = game.Workspace.skate |
2 |
3 | while true do |
4 | part.CFrame = part.CFrame*CFrame.new( 1 , 0 , 0 ) |
5 | part.BrickColor = BrickColor.random() |
6 | print ( "debug" ) |
7 | wait() |
8 | end |