generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Morph on characteradded?

Previous Thread :: Next Thread 
yelloball is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. yelloball
Joined: 17 Feb 2010
Total Posts: 2749
02 Jan 2014 01:23 PM
Problem on line 5, char is nill.
Report Abuse
smiley599 is not online. 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 is not online. 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 is not online. yelloball
Joined: 17 Feb 2010
Total Posts: 2749
02 Jan 2014 02:57 PM
Up please.
Report Abuse
yelloball is not online. yelloball
Joined: 17 Feb 2010
Total Posts: 2749
02 Jan 2014 03:18 PM
Please.
Report Abuse
yelloball is not online. yelloball
Joined: 17 Feb 2010
Total Posts: 2749
03 Jan 2014 09:48 AM
Up.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image