It doesnt spawn my part near me

It wont spawn the part near me it spawns it to another place aka where it used to be before i put it in replicated storage

The script :

	local POS = HumanRoot.CFrame
	local c = player.Character
	local FloorMaterial = c.Humanoid.FloorMaterial
	local x = game.ReplicatedStorage.Shockwave:Clone()
	x.BrickColor = player.Character["HumanoidRootPart"].BrickColor 
	x.Parent = player.Character["HumanoidRootPart"] 
	x.CanCollide = false
	x.Material = "SmoothPlastic" 
	local wx = Instance.new("Weld", x) 
	wx.Part0 = player.Character["HumanoidRootPart"] 
	wx.Part1 = x
	local sound = Instance.new("Sound",player.Character)
	sound.SoundId = "rbxassetid://257282200"
	sound:Play()
	game.Debris:AddItem(sound,0.7)
	wait(0.7)--5805251308
	local Playinh = Instance.new("Sound",player.Character)
	Playinh.SoundId = "rbxassetid://5805251308"
	Playinh:Play()--5805251308
end)

Have you tried setting .Position of x, possibly with a random offset if you would like?

x.Position = POS
1 Like

This should fix your problem (you’re not setting the CFrame that you want the part to have) :

x.CFrame = POS * CFrame.new(0,0,0 = in the player, so choose the correct CFrame you need)