Hi, I made this script for a Gui, It's function is to Teleport whoever clicks the Gui to a Part, But It's also ment to the change the text of the TextButton, so if the text is "Teleport to Top" then it's ment to change it is "Teleport to Bottom" when the Gui is clicked. can anyone help me because the text stays the same:
local tel = script.Parent
local Tel = game.Workspace.Tel1
function Click(Mouse)
local plr = game.Players.LocalPlayer
local character = plr.Character
character:MoveTo(Tel.Position)
if (tel.Text == "Teleport to Bottom (Draggable)") and (tel.FontSize == "Size11") then
tel.Text = "Teleport to Top"
tel.FontSize = "Size12"
elseif tel.Text == "Teleport to Top" and tel.FontSize == "Size12" then
tel.Text = "Teleport to Top"
tel.FontSize = "Size12"
end
end
tel.MouseButton1Down:connect(Click)

3 comments
Edited.
Edited v2, Please edit my script, I might have your Hierachy wrong.
No Difference still won't work