Hello. I am attempting to make an open-close door that swings open and closed like a realistic door. However, I am very inexperienced with body forces, and I am unaware of which one would be best for this project. Any answers or ideas will be appreciated. Thanks.
Happy Thanksgiving!
You do not need to use a BodyForce for this.
http://wiki.roblox.com/index.php?title=Making_a_Door
This could work for opening the door:
local door = script.Parent local cpos = door.Position -- position when closed local opos = Vector3.new(0,0,0) -- position of the door when you open it local bp = Instance.new(¨BodyPosition¨,door) bp.Position = door.Position -- make changes to the BodyPosition here local open = false -- debounce door.Touched:connect(function(hit) local p = game.Players:GetPlayerFromCharacter(hit.Parent) -- checks if it is a player if p then if open == false then open == true bp.Position = opos repeat wait() until door.Position == opos wait(3) bp.Position = cpos repeat wait() until door.Position == cpos open = false end end end)
You should probably most likely use BAV or bodyangularvolocity you could probably make a great animation with it.