I’ve gotten reports from users that use FPS unlockers that in a dorpper-like gameplay section, they are falling too fast making it impossible to beat and play. It works just fine at 60fps or lower, but now above 60 fps.
local StartedWalkspeed = false
local StartingVelocity = 0
local stop = false
Map.Interactives.WalkSpeedOn.Touched:Connect(function(hit)
local Player = Players:GetPlayerFromCharacter(hit.Parent)
if Player and Player == Players.LocalPlayer and Activated and not StartedWalkspeed then
StartedWalkspeed = true
RayParams.FilterType = Enum.RaycastFilterType.Whitelist
RayParams.FilterDescendantsInstances = {Map}
Activated = false
BodyVelocity.Parent = Character.Head
workspace.Gravity = 0
local lastTime = os.clock()
local startTime = os.clock()
local stoptriggered = false
script.wind:Play()
TweenService:Create(script.wind, TweenInfo.new(1), {Volume = .05}):Play()
--FieldOfView = workspace.CurrentCamera.FieldOfView
--TweenService:Create(workspace.CurrentCamera, TweenInfo.new(1), {FieldOfView = workspace.CurrentCamera.FieldOfView + 8}):Play()
TweenService:Create(game:GetService("Lighting"), TweenInfo.new(.375), {Ambient = Color3.fromRGB(135,135,135)}):Play()
while not stop and not BodyVelocity:GetAttribute("STOP") and BodyVelocity.Parent and not Activated and Character.Humanoid.Health > 0 do
local Raycast = workspace:Raycast(Character.HumanoidRootPart.Position - Character:WaitForChild("Humanoid").MoveDirection * 2, Character:WaitForChild("Humanoid").MoveDirection * Vector3.new(1, 0, 1) * 12, RayParams)
if lastDir == Vector3.new(0, 0, 0) and Raycast and Raycast.Instance then else
TweenService:Create(Movement, TweenInfo.new(.2), {Value = if Raycast and Raycast.Instance then Vector3.new() else Character:WaitForChild("Humanoid").MoveDirection * 225}):Play()
end
lastDir = Character:WaitForChild("Humanoid").MoveDirection * 240
BodyVelocity.Velocity = Movement.Value
local END = workspace:Raycast(Character.HumanoidRootPart.Position, Vector3.new(0, -11, 0), EndParams)
if not Activated then
if not stoptriggered then
local dt = lastTime - os.clock()
StartingVelocity -= (dt) * 3.95 * ((1/60) / dt)
if END then
stoptriggered = true
StartingVelocity /= 5
end
end
Character.HumanoidRootPart.CFrame += Vector3.new(0 , StartingVelocity, 0)
else
print("END TRIGGETED")
StartingVelocity = 0
stop = true
end
if not stop then
lastTime = os.clock()
task.wait()
end
end
if BodyVelocity then
BodyVelocity:SetAttribute("STOP", true)
TweenService:Create(BodyVelocity, TweenInfo.new(.1), {Velocity = Vector3.new(0, 0, 0)}):Play()
end
workspace.Gravity = 196.2
end
end)
A few things I’ve tried:
- I tried changing the
task.wait()
totask.wait(1/60)
to make it update only 60 times a second, but in return made it unplayable by making you fall too slowly. - I tried adding a multiplier to half the speed if its over 60 fps which you can see currently, but I’m getting reports that this doesn’t work
any help would be appreciated. Im out of ideas.