I am trying to make a click to move script, and it works fine but I tried making a trail of the path the player will be taking, but it failed horribly.
LocalScript:
Plr=game.Players.LocalPlayer
Plr.PlayerScripts.ControlScript:Destroy()
Mouse=Plr:GetMouse()
repeat wait() until Plr.Character
Char=Plr.Character
CircleMesh = game.ReplicatedStorage.CircleMesh
local Secret=Instance.new("Message")
Secret.Name="Local"
Secret.Parent=Char
Hover=Instance.new("Part")
Hover.Parent = Secret
Hover.Name=Plr.Name.."'s Hover Block"
Hover.FormFactor="Custom"
Hover.Size=Vector3.new(3,.2,3)
Hover.CanCollide=false
Hover.Anchored=true
Hover.Transparency = 1
Mouse.TargetFilter=Hover
Mouse.Button1Down:Connect(function() --Moves character to target position
if Plr.Character.Humanoid.Health ~=0 and Plr.Character.Humanoid.Health >= 5 then
Char.Humanoid.WalkToPoint=Hover.Position
local Trail = Instance.new("Part")
Trail.Parent = Hover
Trail.Name = "Trail"
Trail.CanCollide = false
Trail.Anchored = false
Trail.BrickColor=BrickColor.new("Lime green")
Trail.Size = Vector3.new(1,2,Hover.Position - Plr.Character.LowerTorso.Position)
print(Trail.Size)
It always printed: 1, 2, 0.0500000007, any ideas?

7 comments
Well the size will most likely always be the same because the hover position is never updated to any new value. Try updating the position of Hover on a onMouseHover event.
Do you mean Mouse.Move?
Yes try using that event and keep updating the hovers position with the mouse x, y
I tried this : Hover.Position=Vector3.new(Mouse.Hit.X,Mouse.Hit.Y,Mouse.Hit.Z), still the same number
Ok, I Figured out a way, Here's the script now local X=Mouse.Hit.X local Y=Mouse.Hit.Y local Z=Mouse.Hit.Z local X2=Plr.Character.HumanoidRootPart.Position.X local Y2=Plr.Character.HumanoidRootPart.Position.Y local Z2=Plr.Character.HumanoidRootPart.Position.Z local DisX=math.abs(X-X2) local DisY=math.abs(Y-Y2) local DisZ=math.abs(Z-Z2)
local Distance=DisX+DisY+DisZ
Trail.Size = Vector3.new(1,2,Distance)