You can write your topic however you want, but you need to answer these questions:
What do you want to achieve?
I want to get the player’s humanoid in workspace
What is the issue? I
Can’t figure out anything
What solutions have you tried so far?
I looked everywhere
local ScreenGui = script.Parent
local BlurEffect = game.Lighting.Blur
local ScrollingFrame = ScreenGui.ScrollingFrame
local Play = ScreenGui.Play
Play.MouseButton1Click:Connect(function()
BlurEffect.Enabled = false
ScreenGui.Enabled = false
if game.Workspace.**PlayerName.Humanoid.Health == 0** then
BlurEffect.Enabled = true
ScreenGui.Enabled = true
end
end)
local Player = game:GetService("Players").LocalPlayer
local ScreenGui = script.Parent
local BlurEffect = game.Lighting.Blur
local ScrollingFrame = ScreenGui.ScrollingFrame
local Play = ScreenGui.Play
Play.MouseButton1Click:Connect(function()
BlurEffect.Enabled = false
ScreenGui.Enabled = false
if game.Workspace[Player.Name].Humanoid.Health == 0 then
BlurEffect.Enabled = true
ScreenGui.Enabled = true
end
end)
local ScreenGui = script.Parent
local BlurEffect = game.Lighting.Blur
local ScrollingFrame = ScreenGui.ScrollingFrame
local Play = ScreenGui.Play
local PlayerName = game.Players.LocalPlayer.Name
Play.MouseButton1Click:Connect(function()
BlurEffect.Enabled = false
ScreenGui.Enabled = false
if game.Workspace.PlayerName.Humanoid.Health == 0 then
BlurEffect.Enabled = true
ScreenGui.Enabled = true
end
end)
local ScreenGui = script.Parent
local BlurEffect = game.Lighting.Blur
local ScrollingFrame = ScreenGui.ScrollingFrame
local Play = ScreenGui.Play
local Player = game.Players.LocalPlayer
local Character = workspace.WaitForChild(Player.Name,120)
Play.MouseButton1Click:Connect(function()
BlurEffect.Enabled = false
ScreenGui.Enabled = false
if Character.Humanoid.Health == 0 then
BlurEffect.Enabled = true
ScreenGui.Enabled = true
end
end)
You don’t need to get the model like that, LocalPlayer has a property called Character, which is the Model of the player in workspace. And if it’s not loaded by then, CharacterAdded will wait for the Character to be added