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

How do you project where the building is going?

Asked by 3 years ago

Hi, so i want to make a Building System sort of like Bedwars. I've got the basics done, so far but I need help on when the mouse doesn't have a tareget and it projects where your mouse direction is. If its going on the left side or the right side it all depends on where your mouse is. Heres my code:


local NewCast = workspace:Raycast( workspace.CurrentCamera.CFrame.Position, Mouse.Hit.LookVector * 100 ) if NewCast and NewCast.Instance.Name == "Block" then Selection.Adornee = NewCast.Instance else -- the part down here is what i need help with end end)

Thanks for any help :D!

Answer this question