Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Accessory's position is under the baseplate even though I set it at the head?

local InsertService = game:GetService("InsertService")

game.Players.PlayerAdded:Connect(function(Playe)
	wait(1)
	as = InsertService:LoadAsset("1029025")
	as.Parent = Playe.Character
	as.Fedora.Handle.Position = Vector3.new(Playe.Character.Head.Position)
	local Weld = Instance.new("Weld")
	Weld.Part0 = Playe.Character.Head
	Weld.C0 = Playe.Character.Head.CFrame:Inverse()
	Weld.Part1 = as.Fedora.Handle
	Weld.C1 = as.Fedora.Handle.CFrame:Inverse()
	Weld.Parent = as.Fedora
end)

All it does is set the hat under the baseplate instead of the head. Try it out for yourself. Put this script inside workspace.

1 answer

✓ Accepted answer

You attempted to construct A Vector3 out of another Vector3.

as.Fedora.Handle.Position = Vector3.new(Playe.Character.Head.Position)

Playe.Character.Head.Position is already a Vector3, and if you give improper arguments to this function, you just get a Vector3 instance at the origin.

Simply remove the call and this code works;

as.Fedora.Handle.Position = Playe.Character.Head.Position

This discussion is preserved as it was. New answers, comments, and votes are closed.