Is this possible to do in a server script?

It depends, but why would you like to do that? you can safely remove it on client, cheaters can create their own scripts anyways soo no problem to make it client-side, server-side might not see local scripts as those can be moved by client

3 Likes

i wanted to implement it because whenever the player spawns a vehicle and uses its ability, when they despawn it i dont want the ability to be useable after its despawned, i tried disabling it but it didnt work either

3 Likes

Cheaters will do it anyways, but what you can do is adding some boolean that prevents people from executing commands

2 Likes

how could i implement the boolean value to prevent cheaters from doing so?

3 Likes

Well, one thing it could be is that the script is in StarterCharacterScripts and you’re getting the local script with player:FindFirstChild(“LocalScript”)

Try using char:FindFirstChild(“LocalScript”)

i tried using char:Findfirstchild and it still comes back as nil for some reason

Thats weird. Theres gotta be something causing it to always show up as nil

i dont undestand why its happening, the script is clearly there inside the character and the :Findfirstchild its referencing off has the same name as the script, but the print comes back as nil

1 Like

Yeah, its definitely strange. You could try deleting the local script from the local script itself. Still using the client event though

1 Like

You gave a great idea, instead of sending the remote event to a local script then referencing the ability inside the character, i instead sent the remote event to the ability script itself then when the script gets that event, it destroys itself and it works! thanks for the idea you really helped me. the script finally gets destroyed with the accessory :+1:

1 Like

Nice! Im glad i could help you!

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