i have a fishing rod and i want while the player is holding down the mouse the hook to come closer and closer slowly
i tried to move it with linear velocity but it didnt work
local HookModel = workspace.Floatables:FindFirstChild("HookModel")
local LV = Instance.new("LinearVelocity")
LV.MaxForce = math.huge
LV.Attachment0 = HookModel.Mesh.VelocityAttachment
LV.Parent = HookModel
while game.ReplicatedStorage.Functions.GetKeyHeld:InvokeClient(player, "MouseButton1") and Trown.Value do
LV.VectorVelocity = Handle.CFrame.LookVector * -30
HookModel.Mesh.RopeConstraint.Length = (Handle.Position - HookModel.Mesh.Position).Magnitude
if HookModel.Mesh.RopeConstraint.Length <= 5 then
Trown.Value = false
break
end
wait(.1)
end
LV:Destroy()
if not Trown.Value then
HookModel.Parent = Hook
HookModel.Mesh.Anchored = false
HookModel.Platform.Anchored = false
Handle.WeldConstraint.Enabled = true
HookModel.Mesh.RopeConstraint.Enabled = false
end
end
i think the player is getting pulled instead of the hook but im not sure