|
| 16 Apr 2012 05:56 PM |
I have been trying to make a trampoline for awhile now, but I've had no success.
I am trying to make it so the car I am driving gets pushed into the air.
It only works when I touch it w/o the car.
Can anyone help me make it work so when I drive a car over it it jumps into the air? |
|
|
| Report Abuse |
|
|
|
| 16 Apr 2012 06:13 PM |
I bet you used the trampolin script that sets the velocity of 'hit' to Vector3.new(0,100,0)
The car is a much bigger model with more mass. You need to set the velocity higher and probably add it to multiple bricks, or use BodyThrust. |
|
|
| Report Abuse |
|
|
|
| 16 Apr 2012 06:36 PM |
function onTouched(part) if part.Parent ~= nil then local h = part.Parent:findFirstChild("Humanoid") if h~=nil then h.Parent.Torso.Velocity=Vector3.new(0,1000,0) wait(0.5)
end end end
script.Parent.Touched:connect(onTouched)
*Should I change the "Humanoid" to the model name and I changed the velocity from 300 to 1,000. |
|
|
| Report Abuse |
|
|
|
| 16 Apr 2012 06:39 PM |
You should do:
if part.Parent.Name == "MODEL NAME" then |
|
|
| Report Abuse |
|
|
|
| 16 Apr 2012 06:45 PM |
| I think I added it in wrong. Could you put it in the correct way? |
|
|
| Report Abuse |
|
|
|
| 16 Apr 2012 07:11 PM |
script.Parent.Touched:connect(function(part) if part.Parent.Name == "PART NAME HERE" then part.Velocity=Vector3.new(0,1000,0) end end)
try that. |
|
|
| Report Abuse |
|
|
|
| 16 Apr 2012 08:43 PM |
| If you want just the car to jump then remove all humanoids on touch functions because when cars touch it the script this is a car not a person do not let car jump so remove the humanoid and the humanoid functions |
|
|
| Report Abuse |
|
|