So I have a script that is supposed to give the player a riot shield. For some reason, the shield is just off on the distance.

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		local rarm = char["Right Arm"]
		local cf = rarm.CFrame
		local p = cf.p
		local x = cf.x
		local y = cf.y
		local z = cf.z
		script.Parent.Parent.PrimaryPart = script.Parent
		script.Parent.Parent:SetPrimaryPartCFrame(cf)
		script.Parent.Parent:SetPrimaryPartCFrame(CFrame.Angles(0, 90, -90))
		local weld = Instance.new("Weld")
		weld.Part0 = char["Right Arm"]
		weld.C0 = char["Right Arm"].CFrame:Inverse()
		weld.Part1 = script.Parent
		weld.C1 = script.Parent.CFrame:Inverse()
		weld.Parent = script.Parent.Parent
	end)
end)

4 comments

0

math.rad(90)

0

Where do I put that?

0

CFrame.Angles(0,math.rad(90),0)

0

Didn't fix it.