Cloned object does not appear correctly when cloned

local Trap = game.ServerStorage.BearTrap
local Character
local Player

function plant()
	Character = script.Parent.Parent.Parent
	Player = game.Players:GetPlayerFromCharacter(Character)
	
	local PlacedTrap = Trap:Clone().HumanoidRootPart
	local PlacePos = Character.PrimaryPart.Position
	local PlaceRot = Character.PrimaryPart.Orientation
	PlacedTrap.Parent = workspace
	PlacedTrap.Position = Vector3.new(PlacePos.x, PlacePos.y-4,PlacePos.z)
	PlacedTrap.Orientation = PlaceRot
end

script.Parent.Parent.Activated:connect(plant)

what it looks like in-game:
image
what is expected to see:
image
ServerStorage:
image
image

I can’t make it appear properly for some reason
any help is appreciated :):slight_smile:

After you parent it to workspace do:

PlacedTrap:MakeJoints()

Edit: i made a edit

Also are you trying to clone the trap or the humanoidrootpart?

1 Like

I’m trying to clone the entire trap
Edit:
image
ok

Then just do:

local PlacedTrap = Trap:Clone()

And keep in the makejoints.

modified the script:

local Trap = game.ServerStorage.BearTrap
local Character
local Player

function plant()
	Character = script.Parent.Parent.Parent
	Player = game.Players:GetPlayerFromCharacter(Character)
	
	local PlacedTrap = Trap:Clone()
	PlacedTrap:MakeJoints()
	local PlacePos = Character.PrimaryPart.Position
	local PlaceRot = Character.PrimaryPart.Orientation
	PlacedTrap.Parent = workspace
	PlacedTrap.HumanoidRootPart.Position = Vector3.new(PlacePos.x, PlacePos.y-4,PlacePos.z)
	PlacedTrap.HumanoidRootPart.Orientation = PlaceRot
end

script.Parent.Parent.Activated:connect(plant)

very funny result:
image
the trap is not going with the grey box(which is the humanoid root part)
i spend a lot of time trying to fix this

Try to place the makejoints after parenting like this:

Also, is the Base anchored? and is it weld constrained correctly to the humanoidrootpart?

the base is not anchored

also your script does not work have the same problem as mine

Can i see the properties of the weld?

i use plugin to weld stuff
image

Ok try this since its a model, instead of:

Try this:

PlacedTrap:MoveTo(Vector3.new(PlacePos.x, PlacePos.y-4,PlacePos.z))

is there anyhow to also rotate the trap to the player direction
image
just an extra question though thank u so much

You mean in front of player instead of behind?

image
I want to somehow rotate the trap the direction I place them
as u can see the trap part is not rotated with the grey box

Try to change the CFrame rotation.

You can read here: