ClientScript can't detect players name

i’ve been trying to test a mode ive been working on and ive just used my username to disable the script for now but for some reason the if statements/while loops don’t detect the username

this is what ive tried doing and it prints my username but when it does the check it doesn’t stop the loop or print anything meaning the if statement was false, i don’t know if this has something to do with the script being a client script but ive tried with a server script deleting this script which also didn’t work (note: the script has to be a client script due to everything else in it)

while task.wait() and scp173Folder:FindFirstChildWhichIsA("Model") and game.Players.LocalPlayer.Name ~= "DoubleD606" do
	print(game.Players.LocalPlayer.Name)
	if game.Players.LocalPlayer.Name ~= "DoubleD606" then
		print(game.Players.LocalPlayer.Name)
		print("finally it worked")
		break
	end
end

it’s not erroring or anything the script just continues which i don’t want

If your user is DoubleD606 then game.Players.LocalPlayer.Name ~= "DoubleD606" would be false, so the loop wouldnt break.
Though the loop shouldnt run then either, cuz the same statement is in the while part…
Maybe changing the ~= to == in them would work?

i must’ve forgotten to change it when i made the if statement, thanks

2 Likes

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