I’m trying to create a safedock system allowing for my planes to line up easier. I’ve made so the line creates parts to touch and a script is added to them. When the part is touched by another part it should tell the players gui to make one thing visible and one not. (This is in a local script).
Creating points work, but when the plane is touching the part doesn’t.
This is the script:
local function onTouch(otherPart)
local plr = game.Players.LocalPlayer
plr.PlayerGui.DockingUi.Main.Dockingframe.Points.ScrollingFrame[script.Parent.Name].Visible = true
local num = tonumber(script.Parent.Name)
local lNum = (num - 1)
plr.PlayerGui.DockingUi.Main.Dockingframe.Points.ScrollingFrame[tostring(lNum)].Visible = false
print("activated.. "..script.Parent.Name)
end
script.Parent.Touched:Connect(onTouch)
This is the gui: