|
| 17 Jun 2017 05:58 AM |
doesn't show up anything....
script.Parent.Touched:connect(function(other) local parent = other.Parent if game.Players:GetPlayerFromCharacter(parent) then game.Players.LocalPlayer.PlayerGui.CookGui.ScrollingFrame.Visible = true end end) also tryed
script.Parent.Touched:connect(function(other) local parent = other.Parent if game.Players:GetPlayerFromCharacter(parent) then game.StarterGui.CookGui.ScrollingFrame.Visible = true end end) |
|
|
| Report Abuse |
|
|
|
| 17 Jun 2017 06:02 AM |
Why don't you just do something like this :
script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") ~= nil then local Player = game.Players:GetPlayerFromCharacter(hit.Parent) Player.PlayerGui.CookGui.ScrollingFrame.Visible = true end end) |
|
|
| Report Abuse |
|
|
|
| 17 Jun 2017 06:05 AM |
| still doesn't work, Is it something with r15 that makes it uncompatible? |
|
|
| Report Abuse |
|
|
|
| 17 Jun 2017 06:05 AM |
| Not really, check out your gui. |
|
|
| Report Abuse |
|
|
| |
|
|
| 17 Jun 2017 06:06 AM |
| It never becomes visible... |
|
|
| Report Abuse |
|
|
| |
|
|
| 17 Jun 2017 07:01 AM |
Did you make your script in a localscript?
If not I can explain your error.
In the first example you're asking the game for the LocalPlayer, which only exists in LocalScripts, this feature doesn't work in a normal script.
In the second example you're editing the script in StarterGui, this won't have an effect since GUI's in StarterGui are cloned into the PlayerGui folder once players join. The changes won't have effect until the player dies and reloads the GUI. |
|
|
| Report Abuse |
|
|
|
| 17 Jun 2017 09:28 AM |
| Sorry if I'm a bit slow on the subject, but R15 is still in beta. So it could be a bug. |
|
|
| Report Abuse |
|
|
|
| 17 Jun 2017 09:28 AM |
| um R15 has nothing to do with his code |
|
|
| Report Abuse |
|
|