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)

4 comments
Changes are only detected on where it's been changed. (Server, Client)
what youre doing is only a 1 time detection, so to complicate things up, you need to make it into a while loop, but do not do that instead do:
I don't want to make this a LocalScript as exploiters can easily disable it. What would be a workaround? Can I use something like GetPropertyChangedSignal?
Yes, use GetPropertyChangedSignal("Size") on the handle.