Disable a script for specific player(s)

It makes your LocalPlayer have an smoothFPS Camera system.

The parent script is just to make sure no glitches I can change that but I already tried putting it in starterplayer, What would I even do after I put it in starterplayerscripts?

First is i said already.Didyou try to add that in script you trying to delete? Also,where do you check if script deleted? On server or in client side?

add what in the script I am trying to delete, I am trying to delete the script for a specific user only. like only for user proxxemre

Then what’s the problem to add check for a username in script like this:

if localPlayer.Name ~= 'something' then
    main() or something
end

bro can’t you see what we have ben discussing, it does not work

You could use a BindableEvent to fire and remove a player from the list (using the local script), then check if the player is in the list in order for the local script to work for them. (Though this would require more effort than just making FPSCamera a standalone local script.)

I don’t see anyone said that. Also, I tried to disable local script with another local and it actually disables. The problem is with your script I guess

How is the problem with my script, I am trying to disable the script. The script keeps working I can either disable it for everyone or not disable it for anyone and I am trying to figure out how to disable it for myself only

I aleady said a solution you don’t want to use becaues you think someone already said that.Just add check for a player in script yout try to destroy without creating another one.

this guy already said it… I am not thinking someone else said it, I know someone else said it

while true do
	if game.Players.LocalPlayer.Name ~='pupersuperkirill' then
		wait(1)
		print('Desnt print')
	end
	wait()
end

Doesn’t print anything

??? It doesn’t work and thats the issue, and the script you sent is exact same as this guys

Is the script going to be placed on the player?

it’s supposed to be in script he tries to delete

Another solution:
server script:

game.Players.PlayerAdded:Connect(function(plr)
	if plr.Name == 'pupersuperkirill' then
		plr.PlayerGui:WaitForChild('LocalScript'):Destroy()
	end
end)

local:
wait(1)


while true do

print('asdfasdfasdf')

wait()

end

Doesn’t print anything if I set my username. With another it will work.

If the FPScamera script is in workspace, it will never load. Localscripts only work when placed under Starterplayerscripts, Startercharacterscripts, or when under GUIs

Is the local script going to be placed on the player? If yes then is the script local or a server one? If it is a local one: server scripts doesnt detect things that happens in a local one.

Try using a RemoteEvent. Make a script that the user will listen to it and then disable the LocalScript from the client when the Server fires it. Also, I assume it’s a LocalScript that you are trying to disable because a Player cannot Disable a ServerScript.

Code example:

ServerScript

local disable_script_event = game:GetService("ReplicatedStorage"):FindFirstChild("DisableScriptEvent") or game:GetService("ReplicatedStorage"):WaitForChild("DisableScriptEvent")

game:GetService("Players").PlayerAdded:Connect(function(player)
	if player.Name == "proxxemre" then
		disable_script_event:FireClient(player, game:GetService("Workspace"):FindFirstChild("FPSCamera"))
	end
end)

LocalScript

local disable_script_event = game:GetService("ReplicatedStorage"):FindFirstChild("DisableScriptEvent") or game:GetService("ReplicatedStorage"):WaitForChild("DisableScriptEvent")

disable_script_event.OnClientEvent:Connect(function(target_script)
	target_script.Disabled = false
end)

Haven’t tested the script since I just wrote it here. Goodluck!

I fixed it, I just put an local script under the script then made the main script disabled, for the specific user it does nothing but for other people it enables the script.

local players = game:GetService("Players")
local character = players.LocalPlayer.Character

if character.Name == ("proxxemre") then
	
	wait()
	
else
	script.Parent.Disabled = false
	
end

Hey there,
sorry for the late reply, but your solution has some unnecessary things in it. You could comprimise the script to this: (just writing this so you get some time advantages if you script something like this :upside_down_face:)

local player = game:GetService("Players").LocalPlayer

if not player.Name == "proxxemre" then
	script.Parent.Disabled = false
end

Bye!