KodakKid3
|
  |
| Joined: 25 Dec 2008 |
| Total Posts: 2860 |
|
|
| 14 Mar 2014 04:56 PM |
The upper part of the script, coloring the character and giving it a new face, apply to all people. That part works fine. The gamepass part though, should make someone's parts .8 transparency if they have the pass. It doesn't.
Help?
local passId = 149612481
game.Players.PlayerAdded:connect(function(p) p.CanLoadCharacterAppearance = false p.CharacterAdded:connect(function(c) c.Torso.BrickColor = BrickColor.new("Dark stone grey") c.Head.BrickColor = BrickColor.new("Institutional white") c["Right Arm"].BrickColor = BrickColor.new("Institutional white") c["Left Arm"].BrickColor = BrickColor.new("Institutional white") c["Right Leg"].BrickColor = BrickColor.new("Dark stone grey") c["Left Leg"].BrickColor = BrickColor.new("Dark stone grey") c.Head.face.Texture = "http://www.roblox.com/asset/?id=8560915" function isAuthenticated(player) return game:GetService("GamePassService"):PlayerHasPass(player, passId) end game.Players.PlayerAdded:connect(function(p) if isAuthenticated(p) then c.Torso.Transparency = .8 c.Head.Transparency = .8 c["Right Arm"].Transparency = .8 c["Left Arm"].Transparency = .8 c["Right Leg"].Transparency = .8 c["Left Leg"].Transparency = .8 end end) end) end) |
|
|
| Report Abuse |
|
|
KodakKid3
|
  |
| Joined: 25 Dec 2008 |
| Total Posts: 2860 |
|
|
| 14 Mar 2014 05:19 PM |
| The script looks long and stuff, but it's really very basic. |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 14 Mar 2014 05:28 PM |
local passId = 149612481
game.Players.PlayerAdded:connect(function(p) p.CanLoadCharacterAppearance = false p.CharacterAdded:connect(function(c) c.Torso.BrickColor = BrickColor.new("Dark stone grey") c.Head.BrickColor = BrickColor.new("Institutional white") c["Right Arm"].BrickColor = BrickColor.new("Institutional white") c["Left Arm"].BrickColor = BrickColor.new("Institutional white") c["Right Leg"].BrickColor = BrickColor.new("Dark stone grey") c["Left Leg"].BrickColor = BrickColor.new("Dark stone grey") c.Head.face.Texture = "http://www.roblox.com/asset/?id=8560915" if game:GetService("GamePassService"):PlayerHasPass(player, passId) then for i,v in pairs(c:GetChildren()) do if v:IsA("BasePart") then v.Transparency = .8 elseif v:IsA("Hat") then v.Handle.Transparency = .8 end end end end end)
|
|
|
| Report Abuse |
|
|
|
| 14 Mar 2014 05:28 PM |
There is probably a better way however, this should fix it.
game.Players.PlayerAdded:connect(function(p) p.CanLoadCharacterAppearance = false p.CharacterAdded:connect(function(c) if isAuthenticated(p) then c.Torso.BrickColor = BrickColor.new("Dark stone grey") c.Head.BrickColor = BrickColor.new("Institutional white") c["Right Arm"].BrickColor = BrickColor.new("Institutional white") c["Left Arm"].BrickColor = BrickColor.new("Institutional white") c["Right Leg"].BrickColor = BrickColor.new("Dark stone grey") c["Left Leg"].BrickColor = BrickColor.new("Dark stone grey") c.Head.face.Texture = "http://www.roblox.com/asset/?id=8560915" -- c.Torso.Transparency = .8 c.Head.Transparency = .8 c["Right Arm"].Transparency = .8 c["Left Arm"].Transparency = .8 c["Right Leg"].Transparency = .8 c["Left Leg"].Transparency = .8 else c.Torso.BrickColor = BrickColor.new("Dark stone grey") c.Head.BrickColor = BrickColor.new("Institutional white") c["Right Arm"].BrickColor = BrickColor.new("Institutional white") c["Left Arm"].BrickColor = BrickColor.new("Institutional white") c["Right Leg"].BrickColor = BrickColor.new("Dark stone grey") c["Left Leg"].BrickColor = BrickColor.new("Dark stone grey") c.Head.face.Texture = "http://www.roblox.com/asset/?id=8560915" end end) end)
function isAuthenticated(player) return game:GetService("GamePassService"):PlayerHasPass(player, passId) end |
|
|
| Report Abuse |
|
|
|
| 14 Mar 2014 05:29 PM |
| Gouls looks kinda ugly,but its shorter,and should work |
|
|
| Report Abuse |
|
|
|
| 14 Mar 2014 05:30 PM |
@duel The function isAuthenticated Should be defined BEFORE it says (if isAuthenticated(p) Otherwise,it'll say its nil |
|
|
| Report Abuse |
|
|
|
| 14 Mar 2014 05:34 PM |
| no it looks for the function |
|
|
| Report Abuse |
|
|
|
| 14 Mar 2014 05:37 PM |
... hi() function hi() print"hi" end
Cmon now,that function is nil,unless you define it FIRST
function hi() print"hi" end hi() will work.. |
|
|
| Report Abuse |
|
|
|
| 14 Mar 2014 05:40 PM |
| Woops, sorry, I've been working with java, forgot it went that way with Lua. |
|
|
| Report Abuse |
|
|
KodakKid3
|
  |
| Joined: 25 Dec 2008 |
| Total Posts: 2860 |
|
|
| 14 Mar 2014 05:40 PM |
Thanks, but neither worked (Though goul's didn't break anything either).
qq |
|
|
| Report Abuse |
|
|
|
| 14 Mar 2014 05:41 PM |
| change "player" in goul's to "p" |
|
|
| Report Abuse |
|
|
|
| 14 Mar 2014 05:42 PM |
In gouls change: if game:GetService("GamePassService"):PlayerHasPass(player, passId) then To: if game:GetService("GamePassService"):PlayerHasPass(p, passId) then |
|
|
| Report Abuse |
|
|
KodakKid3
|
  |
| Joined: 25 Dec 2008 |
| Total Posts: 2860 |
|
|
| 14 Mar 2014 05:48 PM |
Thanks Dueling, that worked :)
Now I'll need to get it to just change the legs and torso to Institutional white as well. (Only if you have pass) |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 14 Mar 2014 08:21 PM |
| Lol why are you thanking him it's my script! x) |
|
|
| Report Abuse |
|
|
KodakKid3
|
  |
| Joined: 25 Dec 2008 |
| Total Posts: 2860 |
|
|
| 14 Mar 2014 08:43 PM |
Just that it worked.
ANy idea how I could get it to change the player's torso and legs to Institutional white as well if you have the gamepass? |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 14 Mar 2014 10:08 PM |
| Change the NrickColor String Value to ("Institutional White") instead of ("Dark stone grey") |
|
|
| Report Abuse |
|
|
KodakKid3
|
  |
| Joined: 25 Dec 2008 |
| Total Posts: 2860 |
|
|
| 14 Mar 2014 10:19 PM |
| Well, I want it to stay dark stone gray, but if you have the transparency gamepass, make it white. |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 15 Mar 2014 09:50 PM |
| Then put the Dark Stone Grey BrickColor method outside the if statement for checking the gamepass and the Institutional White BrickColor method inside. |
|
|
| Report Abuse |
|
|