local chosenpart = partt
for i,v in pairs(script.BuildBG:GetChildren()) do
local button = v:Clone()
button.Parent = partt
local axis = ((v.Name == "Back" or v.Name == "Front") and "LookVector") or ( (v.Name == "Left" or v.Name == "Right") and "RightVector" ) or ((v.Name == "Up" or v.Name == "Bottom") and "UpVector")
button.Activated:Connect(function()
mousedown = true
while mousedown do -- tries to ensure the part stays within the bounds of the. It also has to snap by 1 stud.
task.wait(.1)
end
end)
end
Button is a billboardGUI.
Button is parented inside of a part.
The children obtained by buildBG are 6 billboard GUIs
Yeah i know the arrows suck and arent facing in the direction of the part but oh well idk
anyway. The player is meant to click one of the arrows.
While the player is holding the arrow, the part position changes along the axis or direction only and it tries to maintain that position.
I am making a warship building game.