Hi! I was kind of wondering how you would go into making a door that breaks/busts open with a high enough speed?
REFERENCE VIDEO:
I’m making a chase scene for my game and I think this would be a great addition to pump up the fear factor. Although, I am, at best, horrendous with coding. I like this effect, but only for like a one-time use.
How would I go into making this? Should I put a part that detects the humanoid speed, and then busts down the door when it reaches that speed? I honestly don’t know.
Any advice or tips in coding this would be greatly appreciated, thank you!
need some value for each players, if the value is == true then that means the player is ''Sprinting"
if they are sprinting then you can break the door, else, he will not be able to do it
you can check the walkspeed movement, if highter than X , break the door
but what about the player being too close from the door, and just sprinting, that means it will look weird,
for this you can add another value to each player, if would be called “Started to sprint”
this will check if the player was already sprinting or just started to sprint
if the player ''started to sprint" too close from the door-- just disable the method to destroy that door
when the player presses and fire a remote event telling the server that they wish to sprint, just make sure you do that calculation before and check if he was too close from some door,
Sorry for the late reply, but I think I would only be able to script just the part with the values, when the player reaches a maximum type for sprint. I wouldn’t be able to code when the player is too close to the door I would say.
if (DoorPart.Position - player.Character.HumanoidRootPart.Position).Magnitude <= 30 then
print((DoorPart.HumanoidRootPart.Position -
player.Character.HumanoidRootPart.Position).Magnitude)
print("Player is too close from the door, Rush Impact will not be applied")
end