So I’m trying to make it so that when you pick up the ball it will go in front of you. Ive tried to change the CFrame and it didnt work. With the code I have right now, depending on where you walk into the ball it will either spawn behind you, beside you, or in front of you. When I tried doing Ball.CFrame *= CFrame.New(0,0,-1.4)
It just didnt even move the ball. This is the code I have currently
local ball = script.Parent
script.Parent.Touched:Connect(function(part)
if part.Parent:FindFirstChild("Humanoid") then
local controller = part.Parent
local humroot = controller.HumanoidRootPart
local player = game.Players:FindFirstChild(controller.Name)
local character = controller
local weld = Instance.new("WeldConstraint")
weld.Parent = character
weld.Part0 = ball
weld.Part1 = character.HumanoidRootPart
ball.Orientation = humroot.Orientation
ball.Position = Vector3.new(character.HumanoidRootPart.Position.X, 0.75, character.HumanoidRootPart.Position.Z + 1.4)
ball.PlayerControlling.Value = controller.Name
player.ballvalues.hasball.Value = true
end
end)