Current code:
local players: Players = game:GetService("Players")
local function onPlayerAdded(player: Player)
local function onCharacterAdded(character: Model)
local torso: BasePart = character:WaitForChild("Torso") :: BasePart
local sledgehammer: Model = script.Sledgehammer:Clone()
local sledgehammerPrimaryPart: BasePart = sledgehammer.PrimaryPart :: BasePart
local weldConstraint: WeldConstraint = Instance.new("WeldConstraint")
weldConstraint.Part0 = torso
weldConstraint.Part1 = sledgehammerPrimaryPart
weldConstraint.Parent = torso
sledgehammer:PivotTo(torso.CFrame * CFrame.Angles(math.rad(45), math.rad(90), math.rad(90)))
sledgehammer.Parent = character
end
player.CharacterAdded:Connect(onCharacterAdded)
end
players.PlayerAdded:Connect(onPlayerAdded)
What should happen?
Position the Sledgehammer at the torso like this:
The orientation of this sledgehammer is 45, 90, 90
What really happens:
The orientation of this sledgehammer is -0.001, 89.998, 134.996
Any idea why Roblox is ignoring my CFrame.Angles parameters? Please help!