Disable a script for specific player(s)

I am trying to make a script where it disables a script for an specific player, like for a user named proxxemre a Script wouldn’t work.

I have tried multiple solutions but couldn’t achieve my goal but they just dont work, what script should I do and where should I put the script or should the script be a script or local script

game.Players.PlayerAdded:Connect(function(Player)
	if Player.Name == ("proxxemre") then 
		game.Workspace.FPSCamera:Destroy()
	end
end)

I tried this at last, but it didn’t work. (This is an local script in workspace and a script in serverscript service)
I would like some help. I searched everywhere but couldn’t find a solution

Local script doesn’t work on serverscriptservice.
Try changing it to Serverscript

I have tried that, I meant local script in workspace and a normal script in serverscriptservice. Both does not work

Changing it to a script would remove the script for everyone aswell

Instead of destroying the script try changing :Destroy() to disabled = true

Already tried that before, It won’t work

Does the local script work for all clients?
If so then add this to the start of the local script

if game.Players.Localplayer.Name == ("name" ) then
   return
end

If the local script doesn’t work then place the local script under the starterplayerscript

Nothing changed, the script still stays

Instead of return change it to script:Destroy()

I know thats what I did I also did .disabled = true too

Put this in serverscriptservice

local blacklistedPlayers = {
  "yourname",
   "Friendsname"
}

game.Players.PlayerAdded:Connect(function(plr)
   for i, player in blacklistedPlayers do
      if plr.Name == player then
         (SCRIPT):Destroy()
      end
   end
end)

game.Players.PlayerAdded:Connect(function(Player)
if Player.UserId == 123456789 and Player == game.Players.LocalPlayer then
game.Workspace.FPSCamera:Destroy()
end
end)

Change the Id to the Id of the player and put this line in a local script in starterplayerscripts

None of the solutions worked so far. the script still stays for everyone including the specific user

If this code ran and you were the person then it’d delete it for all the clients.

game.Players.PlayerAdded:Connect(function(Player)
	if Player.Name == ("proxxemre") then 
        -- redundant as it deletes it for all clients.
		game.Workspace.FPSCamera:Destroy()
	end
end)

Also, is FPSCamera a localscript?

1 Like

Yes FPSCamera is a local script

Can’t you just put it in StarterPlayerScripts instead?

Didn’t you try to add that in script you trying to delete?

FPSCamera in starterplayerscripts? I cannot exactly do that because its parent is a script which supports the local script

What does this script exactly do? I don’t get the purpose of a camera local script needing a script.