Okay, so this function works ONE TIME, then just doesn’t work again. I don’t know why, it fires in the same way both times. It’s disabled by clicking a button which, I’ve checked, only is fired once. Anyone know what could be goin on? When i put a print statement inside the function to tell me whether the GUI is enabled, it says it is, even after waiting five seconds, but the GUI doesn’t show up and looking at its explicit properties says its not enabled. I’ve checked that its getting the right player, it is, and I’ve even manually enabled the GUI and discovered that the other properties are changing correctly. So, yeah. Dunno what’s going on here, could use some help. This is in a ModuleScript btw.
functions.CollectCake = function(cake, player)
gui = player.PlayerGui:WaitForChild("CakeCollected")
gui.Enabled = true
gui.Border.CakeCollectText.Text = "You found " .. cake.Name .. "!"
gui.Border.CakeCollectText.TextColor3 = cake.TextColor.Value
gui.Border.CakeCollectText.TextStrokeColor3 = cake.TextColorStroke.Value
end