#Orientation/Rotation vector3 script ignores pivot point PLZ HELP
1 messages · Page 1 of 1 (latest)
local pickUpEvent = rs.Events.pickUp
local Configuration = require(rs.ModuleScripts.Configuration)
local hitbox = rs.Union
pickUpEvent.OnServerEvent:Connect(function(player)
local char = player.Character
local hrp = char:WaitForChild("HumanoidRootPart")
local head = char:WaitForChild("Head")
local rx = 90
local ry = 90
local rz = 90
local rotation = CFrame.fromOrientation(0, math.rad(ry + hrp.Orientation.Y), math.rad(rz))
print(math.rad(90)*60, math.rad(hrp.Orientation.Y)*60)
local Distance = hitbox.Size.Y/2
local CheckHitbox = hitbox:Clone()
print(CheckHitbox.Rotation)
CheckHitbox.Parent = game.Workspace
CheckHitbox.CFrame = (CFrame.new(hrp.Position.X, hrp.Position.Y, hrp.Position.Z-Distance) * rotation)
--game.Debris:AddItem(CheckHitbox, 0.5)
end)```
if i rotate it manually, it goes by the pivot point, just not when changing it in the script
im not really good with CFrames, so the solution might be something simple