of     1   

Madified
#185910771Wednesday, March 23, 2016 8:22 PM GMT

So I have a value in PlayerGui called "MType", when I do something like player.PlayerGui.MType.Value = 1 it will say MType doesnt exist and it can't find it even though I am looking right at it
TimeTicks
#185910818Wednesday, March 23, 2016 8:24 PM GMT

:WaitForChild("MType")
KnownEntity
#185910921Wednesday, March 23, 2016 8:26 PM GMT

When you are accessing the PlayerGui, the script can often exicute faster then time it takes for the PlayerGui contents to load into the game. Thus the script cant recognize it existst. Define MType as local MType = Player.PlayerGui:WaitForChild("MType")
Madified
#185910935Wednesday, March 23, 2016 8:26 PM GMT

Okay so I put Plyr.PlayerGui:WaitForChild("MType") Plyr is defined, and it skips this line and goes to the next line and gives me this error 13:26:01.317 - MType is not a valid member of PlayerGui
Madified
#185911010Wednesday, March 23, 2016 8:28 PM GMT

and the function is ran after I click something so it has plenty of time to load the value
KnownEntity
#185911018Wednesday, March 23, 2016 8:28 PM GMT

Can you paste a more full version of your script?
Madified
#185911060Wednesday, March 23, 2016 8:29 PM GMT

Shadow.MouseButton1Down:connect(function() if Plyr.Credits.Value >= 1000 and Plyr.Shadow.Value == false then script.Parent.Shopp.Type.Shadow.Desc.Price.Text = "Owned" script.Parent.Shopp.Type.Current.Text = "Current: Shadow" Plyr.Credits.Value = Plyr.Credits.Value - 1000 Plyr.Shadow.Value = true Plyr.PlayerGui:WaitForChild("MType") Plyr.PlayerGui.MType = 3 elseif Plyr.Shadow.Value == true then Plyr.PlayerGui:WaitForChild("MType") Plyr.PlayerGui.MType = 3 script.Parent.Error.Text = "You are now using 'Shadow'" script.Parent.Shopp.Type.Current.Text = "Current: Shadow" script.Parent.Error.Visible = true wait(3) script.Parent.Error.Visible = false else script.Parent.Error.Text = "You do not have enough credits to purchase that!" script.Parent.Error.Visible = true wait(3) script.Parent.Error.Visible = false end
KnownEntity
#185911424Wednesday, March 23, 2016 8:36 PM GMT

I cant really identify whats wrong from the forum posts, I sent you a PM Madified! :D

    of     1