I tried to make the part follow the player’s mouse but this happened:
Here’s the code:
local plr = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait()
local mouse = plr:GetMouse()
local part = Instance.new("Part",workspace)
while wait() do
part.Anchored = true
part.Transparency = 0.4
part.CFrame = CFrame.new(mouse.Hit.Position)
mouse.Button1Down:Connect(function()
part.Anchored = false
part.CFrame = CFrame.new(mouse.Target.Position)
end)
end
Any help is appreciated!