Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

The Killer Gui wont Kill anyone when someone Clicks on the button can someone help me???

so I wanted to make a gui that can kill people by adding their username and clicking on "Kill Em!" Which removes their head which then causes them to die but for some reason, it won't work I dont know what to do and how to fix this, can someone help me please!

local plr = game.Players.
local txt = script.Parent.Parent.Player.Text

function onClick()
	Player = plr + txt + ".Character"
	Player.Head:Destroy()
end

script.Parent.Parent.Submit.MouseButton1Click:Connect(onClick)

1 comment

0

Since GUI is local and is different on every single player's screen, you can't access the server from something local. You'll need to learn how FilteringEnabled works.

2 answers

✓ Accepted answer

Are you trying to run it from a localscript? if so, then you have to run it with a remote event, otherwise the person wont be dead on their screen, but for yours yes.

Use Remote events as the change will only happen on the players screen and not the server thus not killing him

This discussion is preserved as it was. New answers, comments, and votes are closed.