Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Moving part within the boundaries?

Asked by 7 years ago

Google Translator,sorry

local player = game.Players.LocalPlayer
local mouse = player:GetMouse()

mouse.Move:connect(function()
    workspace.Part.CFrame = CFrame.new(mouse.Hit.p.X,0.5,mouse.Hit.p.Z)

end)

How can I move a part within the boundaries of a specific object (In my case, this is part "Baseplate")? He must move freely, but he can not get out of "Baseplate"

1 answer

Log in to vote
1
Answered by 7 years ago

Here, I made this for anyone who ever wants to do this sort of project....

I made this game:

https://www.roblox.com/games/845845294/unnamed

1
Your welcome :D! greatneil80 2647 — 6y
Ad

Answer this question