I know there's a way with Touched, but how about when you click a GUI?
my attempt:
local plr = game.Players.LocalPlayer -- i know a humanoid isn't in the player from the playergui game.Workspace.Tutorial.Section1.Screen.CoverScreen.StartFrame.StartGui. Next.MouseButton1Click:connect(function() --THIS IS APART OF LINE ATOP, BUT NO ROOM game.Workspace.Tutorial.StarterSpawn.Enabled = false game.Workspace.Level1.Spawn2.Enabled = true plr.Humanoid.Health = 0 end)
All you need to do is get the name of the LocalPlayer and you got it.
Add a .Name to your first line of code.
local plr = game.Players.LocalPlayer.Name
Then you would just have to edit line 8 of your code.
game.Workspace:FindFirstChild(plr)
Every player has a Character property (equal to their character model). Since you already have the local player, you can use that property.
local chr = plr.Character local hum = chr.Humanoid
But in the case that either the character or the humanoid is not loaded yet, this would error. So you should definitely wait for them both to exist.
repeat wait() until plr.Character local chr = plr.Character local hum = chr:WaitForChild("Humanoid")
If you need more explanation, just comment.