--Localscript in the gui button
local plr = game.Players.LocalPlayer
repeat wait() until plr.Character
local interaction = Instance.new("RemoteEvent", workspace)
interaction.Name = "Interaction"
script.Parent.MouseButton1Down:connect(function()
local part = workspace.Part
local trans = 1
interaction:FireServer(part, trans)
end)
--Reg. Script in workspace
local interact = workspace:WaitForChild("Interaction")
interact.OnServerEvent:connect(function(part, trans)
part.Transparency = trans
end) |