I have a part with an attachment and a particle emitter inside it. But i want to add this part to the player (and it works) when he join the scene. The problem is that the particle is not in the same position and I don’t know where is my problem, here the code if you can help me! Thanks!
local Players = game:GetService("Players")
local RS = game:GetService("ReplicatedStorage")
local Dust = RS.Fx.Dust
local function OnPlayerAdded(player)
local dustClone = Dust:Clone()
local character = player.Character
if not character then
character = player.CharacterAdded:Wait()
end
local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
dustClone.Position = humanoidRootPart.Position
dustClone.Parent = player
print(player.Name .. " se ha unido al juego y se le ha asignado una entidad Dust en su posición.")
end
Players.PlayerAdded:Connect(OnPlayerAdded)