|
| 10 Jul 2013 09:16 PM |
Place for reference: http://www.roblox.com/FreeGamesROBLOXs-Place-Number-34-place?id=119566482
Script: p = script.Parent function onTouch() wait(1) for i = 1,20 do p.CFrame=CFrame.new(172, i, 33) wait() end end p.Touched:connect(onTouch)
Expected: Smoothly move the brick and the player on the brick up 20 studs
What happened: The brick moves, but it is glitchy. It moves up a few studs, then down a few studs, very fast. If you don't really understand, try going to the place.
Thanks! |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2013 09:17 PM |
| Add a debounce (basically make it so that you cannot have it activated until it finishes its cycle) |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2013 09:22 PM |
@notunknown Sort of fixed. New script: p = script.Parent local pressed = false
function onTouch() if not pressed then pressed = true wait(1) for i = 1,20 do p.CFrame=CFrame.new(172, i, 33) wait() end pressed = false end end p.Touched:connect(onTouch)
It's LESS glitchy, but repeats itself once it is complete. |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2013 09:24 PM |
| It should not repeat itself. Are you sure you want it to go up 20 studs? |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2013 09:26 PM |
| I think that the for is interfering with it. |
|
|
| Report Abuse |
|
|
|
| 10 Jul 2013 09:26 PM |
| For testing, I just want it to go up 20. I may change it later if I want to use it. |
|
|
| Report Abuse |
|
|