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

How do I find the boss humanoid when cloned? {SOLVED}

So I thought it was simple to make but it's not. How do I make this script grab this boss humanoid?

PLEASE READ The game clones the boss which puts them into the workspace. The problem is that I cant seem to make the script detect if the map exists. If I can find out how to make it know that the map exists then the rest will be a cake walk.

local Boss = game.Workspace:FindFirstChild("TestMap")["Fake Santa"].Humanoid
local healthGui = script.Parent

local function round(n)
	return math.floor(n + 0.5)
end 

healthGui.Health.TextLabel.Text = round(Boss.Health)
Boss.Changed:Connect(function()
	healthGui.Health.TextLabel.Text = round(Boss.Health)
	local healthChange = Boss.Health/Boss.MaxHealth
	healthGui.Health.Meter:TweenSize(UDim2.new(healthChange,0,1,0),"In","Linear",1)
end)

1 answer

Answer: local Boss = game.Workspace:WaitForChild("TestMap")["Fake Santa"].Humanoid

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