Hello everyone, i have a problem with a part, it don’t follow the mouse correctly : (
Help me
Here the situation :
Here the code :
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local PartToFollow = game.ReplicatedStorage.GroundCollectPart:Clone()
PartToFollow.Parent = game.Workspace
mouse.TargetFilter = PartToFollow
local TwS = game:GetService("TweenService")
local TInfo = TweenInfo.new(
0.1,
Enum.EasingStyle.Linear,
Enum.EasingDirection.InOut,
0,
false,
0
)
wait()
while wait() do
local TheTween = TwS:Create(PartToFollow, TInfo, {CFrame = CFrame.new(mouse.Hit.p)})
TheTween:Play()
end