So right now I’m Trying to make a Gui so i can kill a player. The problem is that I’m using a local script. How would I get the same output but with a script so it resets that player on everyones device? here is the script
Thanks
So right now I’m Trying to make a Gui so i can kill a player. The problem is that I’m using a local script. How would I get the same output but with a script so it resets that player on everyones device? here is the script
Thanks
Wait, so I don’t understand what you are asking. You are saying that if you press that GUI it kills the player, but only on the person device?
I have a text box and when I type someones name in, I want it to reset there character
Maybe try to change it to a script and not a local script.
I tried that and it doesn’t work. I don’t even get a error.
And when you test it on someone else, it kills them for your screen but not their?
Yes and but when I kill myself it shows on both.
You would want to use a remoteevent, fire it, then make it kill the player server sided.
Okay i will Try that right now.
@Gamerforyou12 provided the solution, but you should know that using a RemoteEvent to kill people can be abused by exploiters.
In your serverside script, add this:
if Player.Name ~= “maturegotit” then
Player:Kick()
end
Simply just revert said event onto a remote event, instead of keeping it local. Create a string value under the button which revers to the players name, and inside a server script do:
remote.OnServerEvent:Connect(function(Kill)
if script.PlayerName.Value ~= nil then
game.Players:FindFirstChild(script.PlayerName.Value).Chararter.Humanoid.Health = 0
end
end
The value should be a StringValue by the way.
Also if it doesnt work with ~= nil please just change it to = not nil!
Thanks - Scriptuyter