Hello,
We have a problem in my game, namely that when a player hits a slope at high speed, they get bounced high into the sky. This is making the game kind of unplayable. I experimented a bit with bodygyros and thrust, but realized i would never be able to prevent this from happening as I know barely anything about them. I searched the forum and found this post which might offer a solution, but I’m not sure how to implement it (Smooth Movement on Character?). I’m sorry to ask this this way but I’m gonna need someone to write the entire script for me or help me do it because I really can’t.
Thanks in advance
do you have any pictures of the game or maybe even photos?
and do you have any other scripts?
I have a script a few scripts, the only one that could interfere is a double jump script. All my other scripts are just dealing with stuff in the workspace. Double jump script:
local UserInputService = game:GetService(“UserInputService”)
local player = game.Players.LocalPlayer
wait(3)
player.CharacterAdded:Connect(function()
local character = script.Parent.Parent.Character
local humanoid = character:WaitForChild(“Humanoid”)
local doubleJumpEnabled = false
humanoid.StateChanged:Connect(function(oldState, newState)
if newState == Enum.HumanoidStateType.Jumping then
if not doubleJumpEnabled then
wait(.2)
if humanoid:GetState() == Enum.HumanoidStateType.Freefall then
doubleJumpEnabled = true
end
end
elseif newState == Enum.HumanoidStateType.Landed then
doubleJumpEnabled = false
end
end)
UserInputService.InputBegan:Connect(function(inputObject)
if inputObject.KeyCode == Enum.KeyCode.Space then
if doubleJumpEnabled then
if humanoid:GetState() ~= Enum.HumanoidStateType.Jumping then
humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
spawn(function()
doubleJumpEnabled = false
end)
end
end
end
end)
end)
local character = script.Parent.Parent.Character
local humanoid = character:WaitForChild(“Humanoid”)
local doubleJumpEnabled = false
humanoid.StateChanged:Connect(function(oldState, newState)
if newState == Enum.HumanoidStateType.Jumping then
if not doubleJumpEnabled then
wait(.2)
if humanoid:GetState() == Enum.HumanoidStateType.Freefall then
doubleJumpEnabled = true
end
end
elseif newState == Enum.HumanoidStateType.Landed then
doubleJumpEnabled = false
end
end)
UserInputService.InputBegan:Connect(function(inputObject)
if inputObject.KeyCode == Enum.KeyCode.Space then
if doubleJumpEnabled then
if humanoid:GetState() ~= Enum.HumanoidStateType.Jumping then
humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
spawn(function()
doubleJumpEnabled = false
end)
end
end
end
end)
Video:
Thanks for helping me out!
try just placing an invisible wall over the wedges so that they can’t touch them
In game settings you can edit jump power and gravity strength that might be worth A try.
robloxapp-20200501-2040133.wmv (294.6 KB)
Can I ask why the character needs to go so fast in the first place?
@KeysOfFate this is an extreme example to demonstrate the problem, but it is also a problem with lower speeds.
@derpy_dog @Uncovereddylatron your solutions might help but im trying to avoid them to prevent issues later in the game, and both of you solutions would add a lot of extra work (Alot of the terrain consists of slopes) and the gravity would probably break physics of unanchored parts.
I appreciate your help