|
| 24 Apr 2016 05:36 PM |
Could something like "script.Parent.Parent.Parent" be simplified to what it's referring to? Like "ServerStorage"?
|
|
|
| Report Abuse |
|
|
|
| 24 Apr 2016 05:38 PM |
| local serverstorage = script.Parent.Parent.Parent |
|
|
| Report Abuse |
|
|
|
| 24 Apr 2016 08:09 PM |
What I actually want to do is make a team change GUI. In the one I'm using to make sure I got it right (I'm a beginner scripter, so I make the scripts myself then use another script to check it) it's referring to the player as "script.Parent.Parent.Parent.Parent.Parent". How would I simplify this? Would a simple variable do the trick?
|
|
|
| Report Abuse |
|
|
|
| 24 Apr 2016 08:12 PM |
These would be better for the Player instead of Player = script.Parent.Parent.Parent
If you have a local script
local Player = game.Players.LocalPlayer
if it is in a script
game.Players.PlayerAdded:connect(function(Player) --Do stuff here with the Player end) |
|
|
| Report Abuse |
|
|
|
| 24 Apr 2016 08:13 PM |
Player = script.Parent.Parent.Parent.Parent.Parent
function Click(mouse) if Player:IsInGroup(2816341) then Player.TeamColor = BrickColor.new("Burnt Sienna") end end
This is what I have right now.
|
|
|
| Report Abuse |
|
|
|
| 24 Apr 2016 08:16 PM |
I told you not to set your player has Player = script.Parent.Parent.Parent.Parent.Parent
x) |
|
|
| Report Abuse |
|
|
|
| 24 Apr 2016 08:17 PM |
So it should be game.Players.PlayerAdded:connect(function(Player) function Click(mouse) if Player:IsInGroup(2816341) then Player.TeamColor = BrickColor.new("Burnt Sienna")
Or does it need to be different from this?
|
|
|
| Report Abuse |
|
|
|
| 24 Apr 2016 08:20 PM |
| I saw your other thread and I answered it m8. |
|
|
| Report Abuse |
|
|