Tools wont clone a model

for some reason my Tools wont clone a Model from its script.model to the player’s(self player) Head
ive tried using localplayer

local model = script.dmg
script.Parent.Activated:Connect(function(player) ---kalau gk iparis aplr/ player.func
	local clone = model:Clone()
	clone.Parent = player.Body Color
				---
	wait(3)
	clone:Destroy()
end)

in game: (yep model not cloning to the player’s Health script)

when you’re setting the parent to Player.Health, Roblox first assumes that you’re referring to the Health property and not the Health script

And I assume that a custom script so just change the name of that script to like “HealthScript” or something

1 Like

thanks, nor i change the name or remove the clone.parent (it still only clone 1 times) soo i think its just the same

1 Like

When activated there’s no output to the function so the value “player” is nil you could just do script.Parent.Parent.Health instead.

script.Parent.Activated:Connect(function() 
	local clone = model:Clone()
	clone.Parent = script.Parent.Parent:FindFirstChild("Health")
	---
	wait(3)
	clone:Destroy()
end)
2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.