Markilo
|
  |
| Joined: 27 Dec 2013 |
| Total Posts: 6534 |
|
|
| 28 Jun 2016 03:18 AM |
So I'm making a roller coaster/ride that uses track, I normally use this script:
script.Parent.Velocity = script.Parent.CFrame.lookVector*300
How would I make it so it would become -300 on touch of a brick (so when the cart hits it it will switch so the track reverses and goes opposite direction)
R$2,750 AKA dustyshirt |
|
|
| Report Abuse |
|
|
|
| 28 Jun 2016 03:30 AM |
| Script.Parent.CFrame.lookVector:inverse() * 300? |
|
|
| Report Abuse |
|
|
|
| 28 Jun 2016 01:45 PM |
Bump
Andy, I don't think that would work unless you could do wait() so it would switch at a certain time
R$0 AKA dustyshirt |
|
|
| Report Abuse |
|
|
Tynezz
|
  |
| Joined: 28 Apr 2014 |
| Total Posts: 4945 |
|
|
| 28 Jun 2016 01:52 PM |
part.Touched:connect(function(hit) --check if hit is the cart cart.Velocity=cart.CFrame.lookVector*-300 end)
|
|
|
| Report Abuse |
|
|
|
| 28 Jun 2016 01:54 PM |
thank you, i will test that and get back to you
R$0 AKA dustyshirt |
|
|
| Report Abuse |
|
|
|
| 28 Jun 2016 02:02 PM |
uhhh, didn't work
R$0 AKA dustyshirt |
|
|
| Report Abuse |
|
|
|
| 28 Jun 2016 02:04 PM |
nvm
that track has the velocity not the cart
R$0 AKA dustyshirt |
|
|
| Report Abuse |
|
|
|
| 28 Jun 2016 02:05 PM |
meaning the track SHOULD have the velocity
rip
i think i messed up, brb ill get back if i did or didnt
|
|
|
| Report Abuse |
|
|
| |
|
|
| 28 Jun 2016 02:12 PM |
bump, i'm going to elaborate a little more as i feel i'm being too vague of what i'm asking for
the cart is on the track, the track has the velocity and detector script, there are 2 blocks named detector, so when hit in theory velocity should switch and reverse until next detector is hit
i don't know if i'm messing up since i've quite inexperienced at scripting or i'm just plain dumb, which either is the case i'd highly appreciate help
|
|
|
| Report Abuse |
|
|
Tynezz
|
  |
| Joined: 28 Apr 2014 |
| Total Posts: 4945 |
|
|
| 28 Jun 2016 02:16 PM |
script.Parent.Velocity = -script.Parent.CFrame.lookVector*300
|
|
|
| Report Abuse |
|
|
|
| 28 Jun 2016 02:17 PM |
Yes that's the script I use for velocity ?
|
|
|
| Report Abuse |
|
|