script.Parent.MouseButton1Click:connect(function()
	
	script.Parent.Parent.Parent.Parent:WaitForChild("Demons")
	script.Parent.Parent.Parent.Parent:WaitForChild("Hunters")
	script.Parent.Parent.Parent.Parent.Choosing.Enabled = false
	
end)

This code is within a non local script and I would like to make it so the game just sets the players health to 0 or just reset them so they will respawn on the selected team. I was able to make it work in studio by using game.Players.LocalPlayer.Character.Humanoid but that won't work on Roblox Player, only studio. How would I do this without the need of "LocalPlayer"?

3 comments

0
0

I can't seem to find a way for this to help me at all. Any idea how I would be able to use it?

0

You cannot check which player clicked the button with a serverscript unless you put a separate gui into each player's PlayerGui.