#how to move part infront of player even in negative coords

1 messages · Page 1 of 1 (latest)

onyx perch
#

Im making a hitbox region for the player but the hitbox itself is spawning ontop the player, i tried to fix it by changing the vector but when i went into negative xyz it just broke.

#

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 rotation = CFrame.Angles(math.rad(90), math.rad(90), 0)
    local Distance = hitbox.Size.Y/2
    local CheckHitbox = hitbox:Clone()
    
    CheckHitbox.Parent = game.Workspace
         
    CheckHitbox.CFrame = (hrp.CFrame * rotation)
    
    
    game.Debris:AddItem(CheckHitbox, 0.5)
    
    
    
end)```
#

it seems like there would be a simple fix but im not sure what