All right, so in my last post, i asked how i would prevent the flinging. I made it but my friend still somehow found a way around it.
So i used magnitude, but now i cant dash anywhere, i gotta make the map so large if i wanna use dashing, so simple solution, check every second if the player gets near the map.
As you can guess, this script doesn’t work
Any answers why?
remote.Event:Connect(function(character,plr,vel)
RunService.Heartbeat:Connect(function(step)
local distance = 4
local check = false
for _, a in pairs(Maps) do
for _, v in pairs(a:GetChildren()) do
if v:FindFirstChild("HumanoidRootPart") or v:FindFirstChild("PrimaryPart") then
local HumRoot = v:WaitForChild("HumanoidRootPart") or v:WaitForChild("PrimaryPart")
local plrRoot = character:WaitForChild("HumanoidRootPart")
if (HumRoot.Position - plrRoot.Position).magnitude <= distance then
print("removing..")
Debris:AddItem(vel,.1)
else
return
end
end
end
end
end)
end)
Edit: if i make prints before:
if (HumRoot.Position - plrRoot.Position).magnitude <= distance then
Wait so you’re trying to make a Dashing Script I’m guessing? If so, I’ll make you a quick one because the method you’re using wouldn’t really work or is very efficient in-terms of performance.
Body Position will solve it 100%, tweening wouldn’t be that efficient since you would run slightly into the same problem but BodyPos is a lot more efficient in creating a DashingController.
You can add a waitTime to how many times a Player can spam it, no real exploiter can change that unless you add it as a IntValue under the script and base the time off that Value, make sure it’s in the script as a variable, not only that but the only thing the exploiter can change is the BodyPosition properties. It’s either really choosing vulnerability or lag, sadly roblox has it’s limits.