I’m kinda new here, so I don’t know if this is really the right place to post this, please tell me if it is, but anyways, it seems that any script or local script that tries to interact with ui is not working at all.
I tried to mix messing with other services while modifiying ui but it didn’t work, I tried to use a script instead of a local script, it also didn’t work, also no error messages are appearing in the output, so I don’t know what could be causing this, also this seems to affect all games that I make.
I tried this code with a script inside startergui and it worked for some reason
I’ve been having mysterious issues with UI all day today. I even started getting issues with the CoreGui having module requiring errors every time I do a local server test in Studio. Not sure what it is, but I’ve been getting the module recursion error even though the module in question doesn’t require any other module.
I’ve decided with my issues to give it a day or two and see if they sort themselves out on their own. If not, I’m in serious trouble. I just released the first demo for my game hours ago and have already been getting problems of my UI modules sometimes not requiring randomly when people join a server due to the recursive requiring error. I’m unable to track down the error due to having almost 0 success replicating the issue.
local script should be used for gui and etc
it’s client-side script
they run on clients
while script is server-side script
they run on server
try this on local script (putting on StarterGui)
local s=script.Parent
local t=Instance.new("TextLabel")
t.Parent=s.ScreenGui
t.AnchorPoint=Vector2.new(0.5,0.5)
t.Size=UDim2.fromScale(0.25,0.25)
t.Text="Press or Hover"
t:GetPropertyChangedSignal("GuiState"):Connect(function()
if t.GuiState==Enum.GuiState.Press then t.Text="I'm being pressed" and t.TextColor3==Color3.fromRGB(74,70,57)
elseif t.GuiState==Enum.GuiState.Idle then t.Text="Just Chilling" and t.TextColor3==Color3.fromRGB(70,70,70)
elseif t.GuiState==Enum.GuiState.Hover then t.Text="I'm being hovered" and t.TextColor3==Color3.fromRGB(21,21,21)
end
end)
I took a little while to reply because I was experimenting on why this worked and I think ui elements are only being scriptable for me if I create them using instance.new cuz I made a little test local script and it only worked with creating a new one rather than editing an existing one
Ok so let me clarify some of your problems. Sometimes player can load before the game is loaded and that’s the reason things like those can happen, when working with UI’s you should consider using game.Loaded event or game:IsLoaded function, in 99% of UI’s or requiring errors will be fixed.
Thank you for inquiring about this; likely this is not a Studio bug, especially that you’re seeing it on your deployed game. Maybe a DevForum community post is a better forum for this, it’s likely the community can help you debug the issue (as seen in the thread).
Sorry, I forgot I made this and I don’t think this is the reason, I was infact using startergui, but it was working fine for quite some time until it was not (It might still be the reason, so I’ll test this out later)