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?
I think you forgot last number in Trail.Size - Vector3.new in Studio 0.05 it's minimal number