- What do you want to achieve? Keep it simple and clear!
I want to have a custom falling speed for a player character, or atleast a service or instance or something that i can use to make one.
- What is the issue? Include screenshots / videos if possible!
I tried using vector forces but it didnt work
- What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I have looked at a few posts but nothing that suits my needs or that seems useful
VectorForceScript
local playerservice = game:GetService("Players")
local plr = playerservice.LocalPlayer
local totalmass = 0
--here we want a wait until the match has started but since no match system i will just use a wait
local force = Instance.new("VectorForce")
force.Parent = plr.Character.HumanoidRootPart
for _i, v:Instance in pairs(plr.Character:GetDescendants()) do
if v:IsA("BasePart") then
totalmass += v:GetMass()
end
end
print(totalmass)
plr.Character.Humanoid.StateChanged:Connect(function(oldstate, newstate)
print(oldstate)
print(newstate)
if newstate == Enum.HumanoidStateType.Freefall then
force.Force = Vector3.new(0, workspace.Gravity * totalmass, 0)
print("yes")
elseif oldstate == Enum.HumanoidStateType.Freefall then
force.Force = Vector3.new(0, 0, 0)
print("no")
end
end)