yelloball
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 2749 |
|
|
| 02 Jan 2014 06:40 AM |
Hey, goodday.
Im trying to add a sherrif star when a player with the right rank joins the game. I dont see the star appear and I dont get anny ouput. What could be the problem?
game.Players.PlayerAdded:connect(function(Player) Player.CharacterAdded:connect(function(char) if Player:GetRankInGroup(1009991) == 255 then print("Player is the owner of the deputy") s = Instance.new("Part",char.Torso) s.Position = char.Torso.Position s.FormFactor = "Custom" s.Size = Vector3.new(0.2,0.2,0.2) s.BrickColor = BrickColor.New("Bright yellow") m = Instance.new("SpecialMesh",s) m.MeshType = "FileMesh" m.MeshId = "http://www.roblox.com/asset/?id=120647846" m.Scale = Vector3.new(0.5,0.5,0.5) w = Instance.new("Weld") w.Part0 = char.Torso w.Part1 = s print("Player is the owner of the group") else print("Player is NOT the owner of the group, 'LOL'!") end end) end) |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 02 Jan 2014 06:54 AM |
Reset and tell me if it works.
If it does, I know why. |
|
|
| Report Abuse |
|
|
yelloball
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 2749 |
|
|
| 02 Jan 2014 07:14 AM |
| Yeah, when I reset it works, the weld isn't working tho. |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 02 Jan 2014 08:59 AM |
game.Players.PlayerAdded:connect(function(Player) repeat wait() until Player.Character if Player:GetRankInGroup(1009991) == 255 then print("Player is the owner of the deputy") s = Instance.new("Part",char.Torso) s.Position = char.Torso.Position s.FormFactor = "Custom" s.Size = Vector3.new(0.2,0.2,0.2) s.BrickColor = BrickColor.New("Bright yellow") m = Instance.new("SpecialMesh",s) m.MeshType = "FileMesh" m.MeshId = "http://www.roblox.com/asset/?id=120647846" m.Scale = Vector3.new(0.5,0.5,0.5) w = Instance.new("Weld") w.Part0 = char.Torso w.Part1 = s print("Player is the owner of the group") else print("Player is NOT the owner of the group, 'LOL'!") end Player.CharacterAdded:connect(function(char) if Player:GetRankInGroup(1009991) == 255 then print("Player is the owner of the deputy") s = Instance.new("Part",char.Torso) s.Position = char.Torso.Position s.FormFactor = "Custom" s.Size = Vector3.new(0.2,0.2,0.2) s.BrickColor = BrickColor.New("Bright yellow") m = Instance.new("SpecialMesh",s) m.MeshType = "FileMesh" m.MeshId = "http://www.roblox.com/asset/?id=120647846" m.Scale = Vector3.new(0.5,0.5,0.5) w = Instance.new("Weld") w.Part0 = char.Torso w.Part1 = s print("Player is the owner of the group") else print("Player is NOT the owner of the group, 'LOL'!") end end) end)
Try that. I haven't fixed the welds but I should work when you join, not only after you reset. |
|
|
| Report Abuse |
|
|
breuning
|
  |
| Joined: 30 Oct 2008 |
| Total Posts: 4268 |
|
|
| 02 Jan 2014 09:00 AM |
| or instead of using characteradded you can put a script in starterpack/startergui |
|
|
| Report Abuse |
|
|
yelloball
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 2749 |
|
|
| 02 Jan 2014 01:23 PM |
| Problem on line 5, char is nill. |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 02 Jan 2014 01:26 PM |
game.Players.PlayerAdded:connect(function(Player) repeat wait() until Player.Character char = player.Character if Player:GetRankInGroup(1009991) == 255 then print("Player is the owner of the deputy") s = Instance.new("Part",char.Torso) s.Position = char.Torso.Position s.FormFactor = "Custom" s.Size = Vector3.new(0.2,0.2,0.2) s.BrickColor = BrickColor.New("Bright yellow") m = Instance.new("SpecialMesh",s) m.MeshType = "FileMesh" m.MeshId = "http://www.roblox.com/asset/?id=120647846" m.Scale = Vector3.new(0.5,0.5,0.5) w = Instance.new("Weld") w.Part0 = char.Torso w.Part1 = s print("Player is the owner of the group") else print("Player is NOT the owner of the group, 'LOL'!") end Player.CharacterAdded:connect(function(char) if Player:GetRankInGroup(1009991) == 255 then print("Player is the owner of the deputy") s = Instance.new("Part",char.Torso) s.Position = char.Torso.Position s.FormFactor = "Custom" s.Size = Vector3.new(0.2,0.2,0.2) s.BrickColor = BrickColor.New("Bright yellow") m = Instance.new("SpecialMesh",s) m.MeshType = "FileMesh" m.MeshId = "http://www.roblox.com/asset/?id=120647846" m.Scale = Vector3.new(0.5,0.5,0.5) w = Instance.new("Weld") w.Part0 = char.Torso w.Part1 = s print("Player is the owner of the group") else print("Player is NOT the owner of the group, 'LOL'!") end end) end) |
|
|
| Report Abuse |
|
|
yelloball
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 2749 |
|
|
| 02 Jan 2014 01:43 PM |
How would I be able to weld it? I've never done a weld script before.
|
|
|
| Report Abuse |
|
|
yelloball
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 2749 |
|
| |
|
yelloball
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 2749 |
|
| |
|
yelloball
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 2749 |
|
| |
|