So i have been trying to make a tween where a part goes where you are looking, but i cant
seem to get it to work, it just something goes where i want it to, but it goes more to the left or the right, and so on
here is the code:
local p = game.Players.LocalPlayer
uis.InputBegan:Connect(function(inp, gpe)
if gpe then return end
if inp.KeyCode == Enum.KeyCode.G then
local part = game.Workspace.Part
part.CFrame = HRP.CFrame
local tweenInfo = TweenInfo.new(2)
local Tween = t:Create(
part,
tweenInfo,
{Position = p.Character.PrimaryPart.CFrame.LookVector * 30}
)
Tween:Play()
end
end)
could someone help with this issue?