i was wondering how to create a part with the same location as mouse.hit.p that's invisible
✓ ANSWER ACCEPTED
how to create a part with same position as mouse.hit.p?
1 answer
✓ Accepted answer
You would do this
Player = game.Players.LocalPlayer
Mouse = Player:GetMouse()
-- made it so you have to click in order for it to happen
Mouse.Button1Down:connect(function()
if Mouse.Target ~= nil then
part = Instance.new("Part", game.Workspace)
part.Transparency = 1
part.CFrame = CFrame.new(Mouse.Hit.x,Mouse.Hit.y,Mouse.Hit.z)
end
end)
I done it so that you need to left click your mouse in order for it to happen, if you wish for the part to be visible change the transparency to 0.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
that helped thanks!