Why does this print out false outputs sometimes

script:

script.Parent.Touched:Connect(function(plr)
	local owner = game.Players[script.Parent.Plr.Value]
	if owner.Antipush.Value == false then return end
	if plr.Parent.Name ~= script.Parent.Plr.Value and owner.Antipush.Value == true then
		script.Parent.Anchored = true
		print("notowner")
	elseif plr.Parent.Name == script.Parent.Plr.Value and owner.Antipush.Value == true then
		script.Parent.Anchored = false
		print("owner")
	end
end)

the value has the player’s name in it, it prints owner once and prints not owner three times, why is that?

oh my god i forgot to check if its a player

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.