Problem solved and fixed

That’s because something is preventing the Magic Finix Amber from being placed in the backpack correctly, but I’m having trouble figuring out what the cause is unfortunately

1 Like

I see that tool is parent of player’s character in workspace

1 Like

tool is disappearing after equiping and when I unequip then it comes back

1 Like

You gave me an idea, this modification to the server script I gave you might work:

local background = workspace.BloomBackground

local template = workspace.Bloom_Transform
local crown = template.Bloom_MW_crown
local shirt = template.Shirt
local pants = template.Pants
local wing_l = template.Wing_Left
local wing_r = template.Wing_Right
local effect = template.RightHand.Attachment.Fire

game:GetService("ReplicatedStorage").AmberS1.OnServerEvent:Connect(function(player)
	if player.Character then
		local tool = player.Character:FindFirstChild("Magic Finix Amber")

		if tool then
			local animation = tool.LocalScript.Animation
			local character = player.Character
			local humanoid = character.Humanoid

			tool.Handle.Attachment.Fire.Enabled = false

			character.PrimaryPart.Anchored = true
			humanoid.WalkSpeed = 0
			humanoid.JumpHeight = 0

			local clonedBackground = background:Clone()
			clonedBackground.Name = "localBackground"
			clonedBackground.CFrame = character.PrimaryPart.CFrame * CFrame.new(0, 0, 2)
			clonedBackground.Rotation = character.PrimaryPart.Rotation
			clonedBackground.Parent = workspace

			local cloneeffect1 = effect:Clone()
			cloneeffect1.Parent = character.RightHand

			local cloneeffect2 = effect:Clone()
			cloneeffect2.Parent = character.LeftHand

			local music = clonedBackground.MagicWinx
			music.Playing = true

			local track = humanoid.Animator:LoadAnimation(animation)
			track:Play()
			task.wait(3)

			cloneeffect1.Enabled = true
			cloneeffect2.Enabled = true
			task.wait(1.5)
			cloneeffect1.Enabled = false
			cloneeffect2.Enabled = false

			local shirtID = shirt.ShirtTemplate
			character.Shirt.ShirtTemplate = shirtID
			character.Pants.PantsTemplate = "rbxassetid://15724231382"
			task.wait(2)

			local pantsID = pants.PantsTemplate
			character.Pants.PantsTemplate = pantsID
			task.wait(3.75)

			local wing_lclone = wing_l:Clone()
			wing_lclone.Handle.AccessoryWeld.Part1 = character.UpperTorso
			wing_lclone.Parent = character

			local wing_rclone = wing_r:Clone()
			wing_rclone.Handle.AccessoryWeld.Part1 = character.UpperTorso
			wing_rclone.Parent = character
			task.wait(1)

			local crownclone = crown:Clone()
			crownclone.Handle.AccessoryWeld.Part1 = character.Head
			crownclone.Parent =  character
			task.wait(2.5)

			cloneeffect1.Enabled = true
			cloneeffect2.Enabled = true
			task.wait(1)
			cloneeffect1.Enabled = false
			cloneeffect2.Enabled = false
			task.wait(6)

			clonedBackground:Destroy()

			humanoid.WalkSpeed = 16
			humanoid.JumpHeight = 7.2
			character.PrimaryPart.Anchored = false

			tool:Destroy()
		else
			warn("Magic Finix Amber isn't equipped!")
		end
	else
		warn("player.Character is currently nil")
	end
end)
1 Like

now it shows that localscript is not parent of animation but it is located there

1 Like

Do you have multiple LocalScripts inside of the Tool?

1 Like

I don’t have it multiplied.‘’‘’‘’

1 Like

Try changing the LocalScript to:

local event = game:GetService("ReplicatedStorage"):WaitForChild("AmberS1")

local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://15723632456"
animation.Parent = script.Parent

script.Parent.Activated:Once(function()
	event:FireServer()
end)

And the server script to:

local background = workspace.BloomBackground

local template = workspace.Bloom_Transform
local crown = template.Bloom_MW_crown
local shirt = template.Shirt
local pants = template.Pants
local wing_l = template.Wing_Left
local wing_r = template.Wing_Right
local effect = template.RightHand.Attachment.Fire

game:GetService("ReplicatedStorage").AmberS1.OnServerEvent:Connect(function(player)
	if player.Character then
		local tool = player.Character:FindFirstChild("Magic Finix Amber")

		if tool then
			local animation = tool.Animation
			local character = player.Character
			local humanoid = character.Humanoid

			tool.Handle.Attachment.Fire.Enabled = false

			character.PrimaryPart.Anchored = true
			humanoid.WalkSpeed = 0
			humanoid.JumpHeight = 0

			local clonedBackground = background:Clone()
			clonedBackground.Name = "localBackground"
			clonedBackground.CFrame = character.PrimaryPart.CFrame * CFrame.new(0, 0, 2)
			clonedBackground.Rotation = character.PrimaryPart.Rotation
			clonedBackground.Parent = workspace

			local cloneeffect1 = effect:Clone()
			cloneeffect1.Parent = character.RightHand

			local cloneeffect2 = effect:Clone()
			cloneeffect2.Parent = character.LeftHand

			local music = clonedBackground.MagicWinx
			music.Playing = true

			local track = humanoid.Animator:LoadAnimation(animation)
			track:Play()
			task.wait(3)

			cloneeffect1.Enabled = true
			cloneeffect2.Enabled = true
			task.wait(1.5)
			cloneeffect1.Enabled = false
			cloneeffect2.Enabled = false

			local shirtID = shirt.ShirtTemplate
			character.Shirt.ShirtTemplate = shirtID
			character.Pants.PantsTemplate = "rbxassetid://15724231382"
			task.wait(2)

			local pantsID = pants.PantsTemplate
			character.Pants.PantsTemplate = pantsID
			task.wait(3.75)

			local wing_lclone = wing_l:Clone()
			wing_lclone.Handle.AccessoryWeld.Part1 = character.UpperTorso
			wing_lclone.Parent = character

			local wing_rclone = wing_r:Clone()
			wing_rclone.Handle.AccessoryWeld.Part1 = character.UpperTorso
			wing_rclone.Parent = character
			task.wait(1)

			local crownclone = crown:Clone()
			crownclone.Handle.AccessoryWeld.Part1 = character.Head
			crownclone.Parent =  character
			task.wait(2.5)

			cloneeffect1.Enabled = true
			cloneeffect2.Enabled = true
			task.wait(1)
			cloneeffect1.Enabled = false
			cloneeffect2.Enabled = false
			task.wait(6)

			clonedBackground:Destroy()

			humanoid.WalkSpeed = 16
			humanoid.JumpHeight = 7.2
			character.PrimaryPart.Anchored = false

			tool:Destroy()
		else
			warn("Magic Finix Amber isn't equipped!")
		end
	else
		warn("player.Character is currently nil")
	end
end)
1 Like

still that error is appearing.

1 Like

maybe that error shows bc creating anim is in local

2 Likes

I think the issue is since the animation is being created by a LocalScript the server is unaware because of replication. We’ll need to create the animation on the server like so:

local background = workspace.BloomBackground

local template = workspace.Bloom_Transform
local crown = template.Bloom_MW_crown
local shirt = template.Shirt
local pants = template.Pants
local wing_l = template.Wing_Left
local wing_r = template.Wing_Right
local effect = template.RightHand.Attachment.Fire

local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://15723632456"

game:GetService("ReplicatedStorage").AmberS1.OnServerEvent:Connect(function(player)
	if player.Character then
		local tool = player.Character:FindFirstChild("Magic Finix Amber")

		if tool then
			local character = player.Character
			local humanoid = character.Humanoid

			tool.Handle.Attachment.Fire.Enabled = false

			local animation = animation:Clone()
			animation.Parent = tool

			character.PrimaryPart.Anchored = true
			humanoid.WalkSpeed = 0
			humanoid.JumpHeight = 0

			local clonedBackground = background:Clone()
			clonedBackground.Name = "localBackground"
			clonedBackground.CFrame = character.PrimaryPart.CFrame * CFrame.new(0, 0, 2)
			clonedBackground.Rotation = character.PrimaryPart.Rotation
			clonedBackground.Parent = workspace

			local cloneeffect1 = effect:Clone()
			cloneeffect1.Parent = character.RightHand

			local cloneeffect2 = effect:Clone()
			cloneeffect2.Parent = character.LeftHand

			local music = clonedBackground.MagicWinx
			music.Playing = true

			local track = humanoid.Animator:LoadAnimation(animation)
			track:Play()
			task.wait(3)

			cloneeffect1.Enabled = true
			cloneeffect2.Enabled = true
			task.wait(1.5)
			cloneeffect1.Enabled = false
			cloneeffect2.Enabled = false

			local shirtID = shirt.ShirtTemplate
			character.Shirt.ShirtTemplate = shirtID
			character.Pants.PantsTemplate = "rbxassetid://15724231382"
			task.wait(2)

			local pantsID = pants.PantsTemplate
			character.Pants.PantsTemplate = pantsID
			task.wait(3.75)

			local wing_lclone = wing_l:Clone()
			wing_lclone.Handle.AccessoryWeld.Part1 = character.UpperTorso
			wing_lclone.Parent = character

			local wing_rclone = wing_r:Clone()
			wing_rclone.Handle.AccessoryWeld.Part1 = character.UpperTorso
			wing_rclone.Parent = character
			task.wait(1)

			local crownclone = crown:Clone()
			crownclone.Handle.AccessoryWeld.Part1 = character.Head
			crownclone.Parent =  character
			task.wait(2.5)

			cloneeffect1.Enabled = true
			cloneeffect2.Enabled = true
			task.wait(1)
			cloneeffect1.Enabled = false
			cloneeffect2.Enabled = false
			task.wait(6)

			clonedBackground:Destroy()

			humanoid.WalkSpeed = 16
			humanoid.JumpHeight = 7.2
			character.PrimaryPart.Anchored = false

			tool:Destroy()
		else
			warn("Magic Finix Amber isn't equipped!")
		end
	else
		warn("player.Character is currently nil")
	end
end)

Now we no longer need to create the animation in the LocalScript:

local event = game:GetService("ReplicatedStorage"):WaitForChild("AmberS1")

script.Parent.Activated:Once(function()
	event:FireServer()
end)

Edit: @TheCookieDragonPlays I’ve made some important corrections to the server script now

2 Likes

Thank you so much. Now it worked

2 Likes

I have question if you could type in script that if player reset then background deletes?

1 Like

This should work to achieve that:

local background = workspace.BloomBackground

local template = workspace.Bloom_Transform
local crown = template.Bloom_MW_crown
local shirt = template.Shirt
local pants = template.Pants
local wing_l = template.Wing_Left
local wing_r = template.Wing_Right
local effect = template.RightHand.Attachment.Fire

local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://15723632456"

game:GetService("ReplicatedStorage").AmberS1.OnServerEvent:Connect(function(player)
	if player.Character then
		local tool = player.Character:FindFirstChild("Magic Finix Amber")

		if tool then
			local character = player.Character
			local humanoid = character.Humanoid

			tool.Handle.Attachment.Fire.Enabled = false

			local animation = animation:Clone()
			animation.Parent = tool

			character.PrimaryPart.Anchored = true
			humanoid.WalkSpeed = 0
			humanoid.JumpHeight = 0

			local clonedBackground = background:Clone()
			clonedBackground.Name = "localBackground"
			clonedBackground.CFrame = character.PrimaryPart.CFrame * CFrame.new(0, 0, 2)
			clonedBackground.Rotation = character.PrimaryPart.Rotation
			clonedBackground.Parent = workspace

			local cloneeffect1 = effect:Clone()
			cloneeffect1.Parent = character.RightHand

			local cloneeffect2 = effect:Clone()
			cloneeffect2.Parent = character.LeftHand

			local music = clonedBackground.MagicWinx
			music.Playing = true

			local track = humanoid.Animator:LoadAnimation(animation)
			track:Play()
			task.wait(3)

			cloneeffect1.Enabled = true
			cloneeffect2.Enabled = true
			task.wait(1.5)
			cloneeffect1.Enabled = false
			cloneeffect2.Enabled = false

			local shirtID = shirt.ShirtTemplate
			character.Shirt.ShirtTemplate = shirtID
			character.Pants.PantsTemplate = "rbxassetid://15724231382"
			task.wait(2)

			local pantsID = pants.PantsTemplate
			character.Pants.PantsTemplate = pantsID
			task.wait(3.75)

			local wing_lclone = wing_l:Clone()
			wing_lclone.Handle.AccessoryWeld.Part1 = character.UpperTorso
			wing_lclone.Parent = character

			local wing_rclone = wing_r:Clone()
			wing_rclone.Handle.AccessoryWeld.Part1 = character.UpperTorso
			wing_rclone.Parent = character
			task.wait(1)

			local crownclone = crown:Clone()
			crownclone.Handle.AccessoryWeld.Part1 = character.Head
			crownclone.Parent =  character
			task.wait(2.5)

			cloneeffect1.Enabled = true
			cloneeffect2.Enabled = true
			task.wait(1)
			cloneeffect1.Enabled = false
			cloneeffect2.Enabled = false
			task.wait(6)

			clonedBackground:Destroy()

			humanoid.WalkSpeed = 16
			humanoid.JumpHeight = 7.2
			character.PrimaryPart.Anchored = false

			humanoid.Died:Once(function() -- Add things you want to destroy when player dies/resets in here
				clonedBackground:Destroy()
			end)

			tool:Destroy()
		else
			warn("Magic Finix Amber isn't equipped!")
		end
	else
		warn("player.Character is currently nil")
	end
end)
1 Like

Doesn’t work I don’t know why.

1 Like

Do I have to put part in “()”?

1 Like

It’s very late now so I won’t be able to continue helping you today, but make sure the things you want to destroy are inside the function like so:

humanoid.Died:Once(function() -- Add things you want to destroy when player dies/resets in here
	-- Example: part:Destroy()
	clonedBackground:Destroy()
end

And to use :Destroy() for each item you want to destroy

2 Likes

Ok and thank you. Happy Holidays!

1 Like

I have problem with this because it deletes all parts called that but I want to delete part which player made by using tool

1 Like

I tested it on multiplayer and when I used it in the same time it deletes parts of both players

1 Like