I'm trying to make an anti reach script in my sword game and it seems to not detect the handle size being changed when I change it. The original handle size is 1, 0.8, 4
Currently, I have:
local size = Vector3.new(1, 0.8, 4) game.Players.PlayerAdded:Connect(function(plr) plr.CharacterAdded:Connect(function(char) if char:FindFirstChild("Heal") ~= nil then if char:FindFirstChild("Heal").Handle.Size ~= size then print('handle size changed') end elseif char:FindFirstChild("Heal") == nil then if plr.Backpack:FindFirstChild("Heal").Handle.Size ~= size then print('handle size changed') end end end) end)
Sorry, I typed the code wrong. I used a while true loop and it still does nothing.
How can I detect a local change from the server because exploiters can easily bypass it if it's on the client?
local size = Vector3.new(1, 0.8, 4) game.Players.PlayerAdded:Connect(function(plr) plr.CharacterAdded:Connect(function(char) while true do if char:FindFirstChild("Heal") ~= nil then if char:FindFirstChild("Heal").Handle.Size ~= size then print('handle size changed') end elseif char:FindFirstChild("Heal") == nil then if plr.Backpack:FindFirstChild("Heal").Handle.Size ~= size then print('handle size changed') end end end end) end)