I want the name in the textbox to be killed in the game. it works in studio but not in the real game. How do i fix?
local this = script.Parent local killtext = script.Parent.Parent.Killtext.Text local players = game.Players this.Activated:connect (function() local killtext = script.Parent.Parent.Killtext.Text local player = workspace:WaitForChild(killtext) print ("kill " .. player.Name) if player then player.Head:Destroy() end end)
If you have FilteringEnabled on, you'll need to utilize RemoteEvents and or RemoteFunctions or the GUI won't affect the real game.