Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I'm trying to make a script that destroys all players in workspace with FE but it wont work?

Asked by
danglt 185
6 years ago

I put in StarterTools a script that said

game.Players.LocalPlayer.Character:Destroy()

but it did nothing

0
By Starter tools, do you mean starter pack? AbandonedRick 112 — 6y
0
yes danglt 185 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

Hi there,

Here's some things to note about filtering enabled. Filtering enabled does not allow local scripts(Client) to communicate with server scripts which therefore stops hackers as they can only edit their own client script and not mess with the server's workspace, scripts which can be crucial to gameplay. And thus, if affected can result in serious gameplay issues.

Anyway, you would like your script to delete a player's character. And thankfully, Backpack (If you do mean backpack when you say starter tools) is server-sided. Thus, you will not have to worry about server script to client script event activation, which if you would like to learn more in the future when communicating between server and client, refer to this link: http://wiki.roblox.com/index.php?title=Remote_Events_and_Functions

A player's character is not in the Players service. instead, it is inside workspace. As said in your main question, the player's character is a physical body made of parts and thus has to be in workspace. So, you will have to access to the player's character in workspace before deleting their character. So, instead of your current script, you should use this instead.

Note: When you do do local player, you should use it in a local script as it does not work in a server script. If you'd like to get the player on join, do the following as mentioned below.

--Find for player when join
game.Players.PlayerAdded:connectfunction(player)
    --Wait character to be added before getting character
    player.CharacterAdded:connect(function(Character)
    Character:Destroy()
end)
0
Let me know if it's working. AbandonedRick 112 — 6y
Ad

Answer this question