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

How do I labels not showing up on a cloned GUI?

Asked by 5 years ago

I have a script that clones a GUI into the Player's GUIs, the script also enables a script that doesn't mess with the labels. If anyone could help me that would be great!

game:GetService("Players").PlayerAdded:Connect(function(player)
    gui = game:GetService("ReplicatedStorage").MM:Clone()
    gui.Parent = player.PlayerGui
    player.PlayerGui.MM.loadinghandler.Enabled = true
end)

1 answer

Log in to vote
0
Answered by 5 years ago

Enabled and Disabled


The simple answer here is that Scripts and local scripts have a Disabled property , rather than an Enabled property. Therefore the loadinghandler script never gets enabled in your script.

A fixed version of your code would be:

game:GetService("Players").PlayerAdded:Connect(function(player)
    local gui = game:GetService("ReplicatedStorage").MM:Clone()
    gui.Parent = player.PlayerGui
    player.PlayerGui.MM.loadinghandler.Disabled = false
end)

Hopefully this helped!

0
You do realize he could have just put it in the StarterGui, why not suggest that. Never reinvent the wheel User#24403 69 — 5y
0
unless you are sending a rover to mars :p theking48989987 2147 — 5y
Ad

Answer this question