Cant parent to player model roblox

very well a roblox bug

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    a fire parented to a player

  2. What is the issue? Include screenshots / videos if possible!
    the fire disapears

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    search

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

game.Players.PlayerAdded:Connect(function(player)
	local leaderstats = Instance.new('Folder')
	leaderstats.Name =  'leaderstats'
	local Fire = Instance.new('Fire')
	local function change(INT)
		Fire.Heat = INT
		Fire.Size = INT
	end
	change(0)
	local int1 = Instance.new('IntValue')
	int1.Name = 'Heat'-------------
	int1.Value = 0 -- ---------
	int1.Parent = leaderstats
	--int1.Changed:Connect(function(new)
	--	change(new)
	--	task.wait(1)
	--	if new <1 then
	--	else
	--		int1.Value = new-1
	--	end
		
	--end)
	delay(10,function()
		int1.Value = 10
	end)
	--local int = Instance.new('IntValue')
	--int.Name = 'Heat'-------------
	--int.Value = 0 -- ---------
	--int.Parent = leaderstats
	leaderstats.Parent = player
	Fire.Parent = player.CharacterAdded:Wait():WaitForChild('Head') --not error
	delay(10,function()
		print(Fire:GetFullName())
	end)
	while player.Parent do
		local new =  int1.Value 
		change(new)
		task.wait(1)
		if new <1 then
		else
			int1.Value = new-1
		end
	end
end)

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

1 Like

Very strange behavior seems to be happening. I was able to parent the Fire Instance to the player’s head using this script

game:GetService ("Players").PlayerAdded:Connect (function (player)
	local fire = Instance.new ("Fire")

	local character = player.Character or player.CharacterAdded:Wait ()
	
	task.wait (5)
	
	for _,v in pairs (character:GetChildren ()) do
		if v:IsA ("MeshPart") or v:IsA ("Part") then
			print (string.format ("Parenting fire to %s", v.Name))
			
			fire.Parent = v
			
			task.wait (5)
		end
	end
end)

However, if I add this line of code before the loop

fire.Parent = character:WaitForChild ("Head")

it gives me an error of

I would submit a bug report for this, since I assume this is not intended behavior.

The fire disappeares from the game explorer or you just can’t see it?

I believe I know what is wrong. I am pretty sure that Roblox locks certain parts of your character and I guess you can’t parent fire to locked parts.

https://developer.roblox.com/en-us/api-reference/property/BasePart/Locked
doesnt tell me about that

yes

thats not the error

try parenting the fire to an attachment see if it helps