Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

(Question) How do i script bodythrust force? Please help :(

I'm trying to make a Rollercoaster where it waits for a certain amount of seconds and then the force of the the BodyThrust is at a different number, This is the script i've been doing.

wait(10)
script.Parent.Force = 0,0,-35000

1 answer

####Please accept this answer if it solved your problem!

Question

How do I script bodythrust force? Please help :(

##Whats Wrong Force is a Vector3 property. A Vector3 is a 3 dimensional matrix that usually represents a position or direction.

###How do we create a Vector3?

You can use the Vector3.new constructor. Its arguments are in the order x, y, z where x, y, and z represent their corresponding coordinates. (x is x axis and so on).

Vector3.new(x, y, z)

###Solution explained via codeblock

script.Parent.Force = Vector3.new(0, 0, -35000)

Further Reading

https://developer.roblox.com/en-us/api-reference/datatype/Vector3

https://developer.roblox.com/en-us/api-reference/property/BodyForce/Force

This discussion is preserved as it was. New answers, comments, and votes are closed.