Hello!
I’ve been working on a game for a while and I stumbled across an problem. I have first the part, that when touched, scales the character down (to 0.25) and the second, which scales to 1.
The issue is, when I try to walk past any of these, the anti-noclip kind of detects it as a regular part with collision and starts to push me from the part.
The anti-noclip part from my anticheat script
while true do
local hrp = char:WaitForChild("HumanoidRootPart")
local firstPos = hrp.Position
task.wait(0.15)
local secPos = hrp.Position
local rayParams = RaycastParams.new()
rayParams.FilterType = Enum.RaycastFilterType.Exclude
rayParams.FilterDescendantsInstances = {char}
local rayResult = workspace:Raycast(firstPos, (secPos - firstPos), rayParams)
if rayResult and rayResult.Instance.CanCollide == true then
local params = OverlapParams.new()
params.FilterType = Enum.RaycastFilterType.Exclude
params.FilterDescendantsInstances = {}
local partsResult = workspace:GetPartsInPart(rayResult.Instance, params)
if partsResult[1] then
hrp.CFrame = CFrame.new(firstPos)
end
end
end
Any help is appreciated!