Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why is this piece of code in relation to a GUI not working?

Asked by 8 years ago

local players = game:GetService("Players")

function onTouched(part) local player = players:GetPlayerFromCharacter(part.Parent) if player then local abzx = player.PlayerGui.Objective1.Frame abzx:destroy() local xyabc = game.StarterGui.Objective2.Frame xyabc.BackgroundTransparency = 1

end

script.Parent.Touched:connect(onTouched)

Basically, the purpose of this script is to remove the current GUI (Which was initially first appearing on the player screen) then change the transparency of another GUI in order to make that one appear on the screen instead. I have checked the error log and I cannot see a one which revolves around this piece of code. Has anyone got any clue as to why it is not working?

0
By the way the code above was not like that, some of the code was indented and all of them were on seperate lines. EmperorTerminus 55 — 8y
0
Scroll up to your question, click Edit on the right, clear up all the code you just pasted, click the blue Lua button, and then paste the code again between the squiggly lines. funyun 958 — 8y

Answer this question