BackgroundTransparency = script.Parent.Parent.Background.BackgroundTransparency function Click() -- after the arrow was clicked V happens script.Parent.Parent.Parent.Parent.Character.Torso.CFrame = CFrame.new(-94.6, 36.8, -16.5) -- teleports player script.Parent.Parent.Background.BackgroundTransparency = BackgroundTransparency -0.1-- problem is here it only works once :/ can you make it work twice? wait(0.1) -- wait 0.1 end -- ends script script.Parent.MouseButton1Down:connect(Click) -- connects function to script
1 thing the variable for the gui is missing
gui= script.Parent-- you are missing the whole variable gui.BackgroundTransparency = script.Parent.Parent.Background.BackgroundTransparency function Click() -- after the arrow was clicked V happens script.Parent.Parent.Parent.Parent.Character.Torso.CFrame = CFrame.new(-94.6, 36.8, -16.5) -- teleports player script.Parent.Parent.Background.BackgroundTransparency = gui.BackgroundTransparency -0.1 wait(0.1) -- wait 0.1 end -- ends script script.Parent.MouseButton1Down:connect(Click) -- connects function to script
script.Parent.Parent.Background.BackgroundTransparency --This is a number, and will always remain the same number, unless you update the varible later in the script.
Let's say BackgroundTransparency is equal to 1.
script.Parent.Parent.Background.BackgroundTransparency = gui.BackgroundTransparency -0.1
1 - 0.1 = 0.9, so it will make the gui a little more transparent.
Now, the gui's BackgroundTransparency is 0.9, but the variable you made named 'BackgroundTranspareny' still equals 1!
Therefore, each time you click it sets the gui's BackgroundTransparency to 0.9.
To fix this, just do the following:
script.Parent.Parent.Background.BackgroundTransparency = script.Parent.Parent.Background.BackgroundTransparency - 0.1 --Subtracts 0.1 from the transparency every time you click.
about the Transparency if ya mean to do 2'ice then just add in another one that is lalala.Transparency -01 and also, for Teleporting, dont do the Torso, do the Character cos it just does the Torso not the Hole Body...