i have this script that lets me spawn balls on E
Tear = game.ReplicatedStorage.tear
local plr = game.Players.LocalPlayer
UserInput = game:GetService("UserInputService")
UserInput.InputBegan:Connect(function(input , gameProccesedevent)
if input.KeyCode == Enum.KeyCode.E then
local tearclone = Tear:Clone()
tearclone.Parent = game.Workspace
tearclone.CFrame = plr.Character.HumanoidRootPart.CFrame + plr.Character.HumanoidRootPart.CFrame.lookVector * 5
end
end)
right now, the ball spawns infront of the humanoidrootpart. but i want it to spawn 5 studs away from where the player is looking. im pretty bad at inserting stuff to scripts, so a modified version of this script would be great.

1 comment
i inserted the script you sent and the parts spawn directly in the center of the map. why