|
| 19 Jun 2017 11:25 AM |
Works completely fine in Studio. In game, it says that 'Stats' is not a valid member of 'PlayerGui'. I tried using :WaitForChild() and :FindFirstChild() to but it still did not work.
Script: script.Quirky_3.OnServerEvent:connect(function(Player) Player.Quirk.Quirk_Limit.Value = 0 if Player.Quirk.Value == "Half Cold, Half Hot" then for i,v in pairs (Player.Backpack.Quirks:GetChildren()) do v.Disabled = false end for i,v in pairs (Player.PlayerGui.Stats:GetChildren()) do if v.Name == "Training" then v.Disabled = false end end for i,v in pairs (Player.PlayerGui.Stats:GetChildren()) do if v.Name == "MobileControls" then v.Disabled = false end end Player.Character.Humanoid.WalkSpeed = math.floor(16 + Player.Attributes.Agility.Value / 5) end if Player.Quirk.Value == "Explosion" then for i,v in pairs (Player.Backpack.Quirks:GetChildren()) do v.Disabled = false end for i,v in pairs (Player.PlayerGui.Stats:GetChildren()) do if v.Name == "Training" then v.Disabled = false end end for i,v in pairs (Player.PlayerGui.Stats:GetChildren()) do if v.Name == "MobileControls" then v.Disabled = false end end end end)
#code print("Lightning Flame Dragon Mode...") --I am totally not Natsu Dragneel |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2017 11:33 AM |
b1
#code print("Lightning Flame Dragon Mode...") --I am totally not Natsu Dragneel |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2017 11:34 AM |
it's in the playergui so it's on their client and you're trying to access that, not sure if im wrong
|
|
|
| Report Abuse |
|
|
|
| 19 Jun 2017 11:36 AM |
So how could I access it?
#code print("Lightning Flame Dragon Mode...") --I am totally not Natsu Dragneel |
|
|
| Report Abuse |
|
|
kojocrash
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 277 |
|
|
| 19 Jun 2017 11:36 AM |
1. Did you create the stats folder with a server script 2. Did you put :WaitForChild() for all the places it says stats 3. Is stats spelled correctly |
|
|
| Report Abuse |
|
|
kojocrash
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 277 |
|
|
| 19 Jun 2017 11:37 AM |
| Put it in starterplayer then point your scripts to that |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2017 11:38 AM |
Stats is a GUI. It's already in the StarterGui by default, yes its spelt correctly and i did put :WaitForChild() everywhere
#code print("Lightning Flame Dragon Mode...") --I am totally not Natsu Dragneel |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2017 11:38 AM |
well if the values were changed on the client then it wouldnt be seen on the server if your games is fe
|
|
|
| Report Abuse |
|
|
|
| 19 Jun 2017 11:39 AM |
I'll pay you @100 R$ if you could help me so that it can access the 'Stats' GUI
#code print("Lightning Flame Dragon Mode...") --I am totally not Natsu Dragneel |
|
|
| Report Abuse |
|
|
kojocrash
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 277 |
|
|
| 19 Jun 2017 11:41 AM |
Usually I'd make a script so its way easier:
game.Players.PlayerAdded:connect(function(plr) local Stats = Instance.new("Folder",plr) local Stats.Name = "Stats" end) |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2017 11:41 AM |
yeah but 'Stats' is a GUI...not a folder?
#code print("Lightning Flame Dragon Mode...") --I am totally not Natsu Dragneel |
|
|
| Report Abuse |
|
|
| |
|
kojocrash
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 277 |
|
|
| 19 Jun 2017 11:45 AM |
Im on my phone so I cant type but you can send arguments from the local script thats fires it. The local script can access gui. Example:
--In local script game.Workspace.RemoteEvent:FireServer(put the stats value) --In RemoteEvent script.Parent.OnServerEvent:connect(function(player,stats1,stats_ect) |
|
|
| Report Abuse |
|
|