Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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

✓ Accepted answer

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

This discussion is preserved as it was. New answers, comments, and votes are closed.