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

my gui does cant be seen by the playing player?

Asked by 3 years ago

so i am calling a function when the button is clicked and that works its just the the gui is not visible to the playing player it works while im still in studio but as soon as i go into test it just wont be visible

here is my script:

local Question = game.StarterGui.Traitorgui.yesORno
script.Parent.TextButton.MouseButton1Click:Connect(function() -- If button is clicked
    Question.Visible = true
end)

just to show that the script works! it has been tested and the button and the clickdetector works títs something wrong with the gui and i do not know what!

the gui contains:

ScreenGui (not named that) Frame (Not named that) CornerUI, TextButton(not named that) TextButton(not named that), The LocalScript, textlabel x2 CornerUI CornerUI

1 answer

Log in to vote
0
Answered by
tomekcz 174
3 years ago

Upon the player spawn the gui is copied from StarterGui to PlayerGui (in player) (which is client side) the StarterGui is not linked with PlayerGui so if anything changes in StarterGui it dosen't change in PlayerGui the results only can be seen when player resets, then the StarterGui is copied again

--I could've mispelled smth but you should be able to correct it
local Question = game.players.LocalPlayer.PlayerGui.Traitorgui.yesORno
script.Parent.TextButton.MouseButton1Click:Connect(function() -- If button is clicked
    Question.Visible = true
end)
0
TYSM bro itzstarboss 9 — 3y
Ad

Answer this question