I’m trying to make a rake target thing and I’m testing out some stuff. I’m testing it with a wall (Anchored) and it’s extremely buggy. It only works after a bit
Script:
local Part = workspace.TestPart
while wait(0.1) do
for index, value in ipairs(game:GetService("Players"):GetPlayers()) do
local CharacterAdded = value.Character or value.CharacterAdded:Wait()
local HRP = value.Character.HumanoidRootPart
local RakeModel = Part
local Distance = (HRP.Position - RakeModel.Position).Magnitude
if Distance <= 100 then
warn("hey!")
if Distance < Part.CurrentTargetMagnitude.Value then
Part.CurrentTargetMagnitude.Value = Distance
end
end
print(Distance)
end
end