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

Whats wrong with this code?

Asked by
StoIid 364 Moderation Voter
8 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

I am trying to have a script detect if something is Nil, and if it is, it'll just give the player a copy of the Loaded bool but it's giving me the error "Loaded is not a valid member of Player" and not going through the rest of the script. Any idea why?

local player = game.Players.LocalPlayer
local loaded = script.Loaded

if player.loaded == nil then 
    script.Loaded:Clone().Parent = player
end

if player.Loaded == true then 
    player.PlayerGui.Music.MusicPanel.Visible = true
    player.PlayerGui.PlayButton.PlayPanel.Visible = true
end

0
use :FindFirstChild() theCJarmy7 1293 — 8y

Answer this question