Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I'm trying to use lerp on a Mouse position can anyone please tell me if I'm doing it right or wrong?

Asked by 1 year ago
Edited 1 year ago

this is what I have so far


local Item = script.Parent local p = game.Players.LocalPlayer local Handle = Item.Handle local m = p:GetMouse() local function r() local Cube = Instance.new(Part, game.Workspace) Cube.Size = Vector3.new(3.5, 2, 4) local startP = Handle.Position Cube.Position = startP wait(.001) Cube.CFrame = Cube.CFrame:Lerp(m.Hit.Position, .98) end Item.Activated:Connect(function() r() end)

1 answer

Log in to vote
0
Answered by
Puppynniko 1059 Moderation Voter
1 year ago

it is working but the alpha your setting it to is .98 which is like 98% of the mouse position set it down to .5 or .6

Ad

Answer this question