So let me set the scene, I'm making a Gui that can affect the Workspace, but I'm not gonna know what the tree is to get to the thing from game, so I need to have it from where the script's origin is. Any idea how to help?
Current Code:
local LR = script.Parent.Parent.Parent.Parent.LegRest
local button = script.Parent
local function test()
LR.Transparency = 0
LR.CanCollide = false
end
button.MouseButton1Click:Connect(test)
Tree: https://gyazo.com/ed50f7a0a4e6f5c08dba69af1c75c2d3
Thanks in advanced.

2 comments
?
https://developer.roblox.com/api-reference/event/GuiButton/MouseButton1Click