Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

how to create a part with same position as mouse.hit.p?

i was wondering how to create a part with the same location as mouse.hit.p that's invisible

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.

1 comment

0

that helped thanks!

This discussion is preserved as it was. New answers, comments, and votes are closed.