Yeah thats crazy! I just found about them and they quickly fixed the problem i had for days…
You can use Humanoid:ChangeState(Enum.HumanoidStateType.Dead)
Thanks! I appreciate your help!
I agree, hopefully more people start to use these because of the new Platformer template
Im making a parkour game but i ran into some problems, you can see in my topics, but when i tried this, it worked! THANKS! And now im making a custom module that simplifies this. I like making modules for others!
That’s awesome to hear, interested to see what the module’s like when you’re finished!
For those wondering how to know if someone died, all you need is a local script, A remote event and a script, first make a remote event in ReplicatedStorage
, I’ll call it DeathEvent and create a script in ServerScriptService
name it whatever you want, put this code into it:
game.ReplicatedStorage.DeathEvent.OnServerEvent:Connect(function(plr)
local char = plr.Character
local hum = char:FindFirstChildOfClass("Humanoid")
hum:ChangeState(Enum.HumanoidStateType.Dead)
end)
add this script to the character controller local script:
humanoid.HealthChanged:Connect(function(health)
if health <= 0 then
local hum:Humanoid = humanoid
game.ReplicatedStorage.DeathEvent:FireServer()
hum:ChangeState(Enum.HumanoidStateType.Dead)
end
end)
The local script will trigger and tell the server about a death, the server will then change the state to Dead. Edit: I forgot to add health <= 0
I’d like to inquire about how to cancel the force I have on the unanchored part, which seems to be assumed to be friction, but I don’t know how to fix it. I want to cancel the force that is caused by my movement on the part under my foot
This is (as far as i can tell) because of Newton’s third law (every action has an equal and opposite reaction). The only way I can see to fix this is to increase the mass of the unanchored object.
Does newtons law REALLY works in roblox?? Thats realistic
Considering the controllers are physics based instead of scripted movement (which is how i assume the CoreScript for movement works) I don’t think it’s a far off hypothesis. May be wrong though, feel free to correct me
Do you have any tips on how to implement other movement mechanics like double jumping, wall climbing, and wall running?
I have done wall running, if you don’t know how, I recommend you watch kaivexx’s video. You can watch tutorials for others as well; they work perfectly with controllers. (make sure to get controller scripts from the official post)
what is the advantages of using this? like what differences from humanoid? i never heard of this until now/
Its more realistic/physics based than the default humanoids
Wow, 50 likes! Maybe I should extend this tutorial a bit…
- Built-in controls for acceleration and deceleration
- Conservation of air momentum, useful for platformers or other movement-based games
- Intuitive checking for whether the character is midair or on the ground. Just check the controllerManager’s ActiveController property to see if it’s using the ground or air controller!
ok this is the major reason ill use this, finally you can jump off a moving vehicle without getting left behind
I really think you should add
raycastParams.RespectCanCollide = true
so raycast doesn’t detect noncollideable parts