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: Scripting Help

Previous Thread :: Next Thread 
coboy10 is not online. coboy10
Joined: 07 Feb 2010
Total Posts: 169
20 Jul 2011 12:16 PM
Just need a bit of help. If you can script, then you know what this does, or should do. I can't seem to get it to work. Know the problem?


game.Players.PlayerAdded:connect(onPlayerRespawned)
function onPlayerRespawned(newPlayer)
wait(1)
if newPlayer:IsInGroup(285701) then
gui=Instance.new("BillboardGui")
gui.Parent=newPlayer.Character.Head
gui.Adornee=newPlayer.Character.Head
gui.Size=UDim2.new(3,0,3,0)
gui.StudsOffset=Vector3.new(0,2,0)
text=Instance.new("ImageLabel")
text.Image = "http://www.roblox.com/asset/?id=56600248"
text.Size=UDim2.new(1.25,0,1.25,0)
text.Position=UDim2.new(-0.125,0,-0.25,0)
text.BackgroundTransparency = 1
text.Parent=gui
w = game.Lighting.WepsGroup:GetChildren()
for i = 1,#w do
w[i]:Clone().Parent = newPlayer.Backpack
elseif newPlayer:IsInGroup(313353) then
gui=Instance.new("BillboardGui")
gui.Parent=newPlayer.Character.Head
gui.Adornee=newPlayer.Character.Head
gui.Size=UDim2.new(3,0,3,0)
gui.StudsOffset=Vector3.new(0,2,0)
text=Instance.new("ImageLabel")
text.Image = "http://www.roblox.com/asset?id=56633940"
text.Size=UDim2.new(1.25,0,1.25,0)
text.Position=UDim2.new(-0.125,0,-0.25,0)
text.BackgroundTransparency = 1
text.Parent=gui
w = game.Lighting.WepsGroup:GetChildren()
for i = 1,#w do
w[i]:Clone().Parent = newPlayer.Backpack
end
end
end
end
function onPlayerEntered(newPlayer)
newPlayer.Changed:connect(function (property)
if (property == "Character") then
onPlayerRespawned(newPlayer)
end
end)
end

game.Players.PlayerAdded:connect(onPlayerEntered)
Report Abuse
Seranok is not online. Seranok
Joined: 12 Dec 2009
Total Posts: 11083
20 Jul 2011 12:16 PM
http://www.roblox.com/Forum/ShowPost.aspx?PostID=9772680
Report Abuse
coboy10 is not online. coboy10
Joined: 07 Feb 2010
Total Posts: 169
20 Jul 2011 12:24 PM
MHm...
It doesn't have an output. It's suppose to, when entered and when you respawn, give someone in a specific group, and honors group, a BillboardGui. Each group gives a different image. I thought I had it right, but it doesn't work.
Report Abuse
Seranok is not online. Seranok
Joined: 12 Dec 2009
Total Posts: 11083
20 Jul 2011 12:26 PM
game.Players.PlayerAdded:connect(onPlayerRespawned)

...

Just think about that line...
Report Abuse
coboy10 is not online. coboy10
Joined: 07 Feb 2010
Total Posts: 169
20 Jul 2011 12:29 PM
I think something is wrong with line 20.

Sera, when it's only one group and image, it works fine. So that isn't the problem.
Report Abuse
coboy10 is not online. coboy10
Joined: 07 Feb 2010
Total Posts: 169
20 Jul 2011 12:35 PM
Bump.
Report Abuse
alexmach1 is not online. alexmach1
Joined: 02 May 2008
Total Posts: 1977
20 Jul 2011 12:38 PM
you have a connection line at the very beginning with no function that connects it.

game.Players.PlayerAdded:connect(onPlayerRespawned)


should be


function onPlayerRespawned(newPlayer)


and the last line could be (i dont think it has to):


game.Players.ChildAdded:connect(onPlayerRespawned)
Report Abuse
coboy10 is not online. coboy10
Joined: 07 Feb 2010
Total Posts: 169
20 Jul 2011 12:39 PM
I'll try that.
Report Abuse
coboy10 is not online. coboy10
Joined: 07 Feb 2010
Total Posts: 169
20 Jul 2011 12:45 PM
Didn't work. With just the first if, and not the elseif, it'll work and that group will have a BillboardGui. With the elseif, and everything associated with it, it won't work at all. So, I assume it has something to do with line 20, where the elseif starts.

This is for the script originally posted.
Report Abuse
coboy10 is not online. coboy10
Joined: 07 Feb 2010
Total Posts: 169
20 Jul 2011 12:52 PM
Bump.
Report Abuse
coboy10 is not online. coboy10
Joined: 07 Feb 2010
Total Posts: 169
20 Jul 2011 02:10 PM
Bump.
Report Abuse
coboy10 is not online. coboy10
Joined: 07 Feb 2010
Total Posts: 169
21 Jul 2011 12:24 PM
Bump. Still need help. =3
Report Abuse
coboy10 is not online. coboy10
Joined: 07 Feb 2010
Total Posts: 169
26 Jul 2011 02:53 PM
Bump.
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
26 Jul 2011 02:58 PM
what do you want it to be?
a group billboard....YES?
Report Abuse
coboy10 is not online. coboy10
Joined: 07 Feb 2010
Total Posts: 169
26 Jul 2011 03:05 PM
Yeah, except it only works with one group, and I need an honors group Gui too, and it won't work with both.
Report Abuse
tootizard is not online. tootizard
Joined: 26 Jul 2010
Total Posts: 11
26 Jul 2011 03:38 PM
Hey I need some help i'm a terrible scripter but i need a script where when you die you spawn at a specific spawn point can someone help?
Report Abuse
darkkiller5555 is not online. darkkiller5555
Joined: 22 Nov 2009
Total Posts: 6359
26 Jul 2011 03:41 PM
game.Players.PlayerAdded:connect(function(newPlayer)
newPlayer.CharacterAdded:connect(function(char)
if newPlayer:IsInGroup(285701) then
gui=Instance.new("BillboardGui")
gui.Parent=char.Head
gui.Adornee=char.Head
gui.Size=UDim2.new(3,0,3,0)
gui.StudsOffset=Vector3.new(0,2,0)
text=Instance.new("ImageLabel")
text.Image = "http://www.roblox.com/asset/?id=56600248"
text.Size=UDim2.new(1.25,0,1.25,0)
text.Position=UDim2.new(-0.125,0,-0.25,0)
text.BackgroundTransparency = 1
text.Parent=gui
w = game.Lighting.WepsGroup:GetChildren()
for i = 1,#w do
w[i]:Clone().Parent = newPlayer.Backpack
end
elseif newPlayer:IsInGroup(313353) then
gui=Instance.new("BillboardGui")
gui.Parent=newPlayer.Character.Head
gui.Adornee=newPlayer.Character.Head
gui.Size=UDim2.new(3,0,3,0)
gui.StudsOffset=Vector3.new(0,2,0)
text=Instance.new("ImageLabel")
text.Image = "http://www.roblox.com/asset?id=56633940"
text.Size=UDim2.new(1.25,0,1.25,0)
text.Position=UDim2.new(-0.125,0,-0.25,0)
text.BackgroundTransparency = 1
text.Parent=gui
w = game.Lighting.WepsGroup:GetChildren()
for i = 1,#w do
w[i]:Clone().Parent = newPlayer.Backpack
end
end
end)
end)

Try that?

Very messy script.
Report Abuse
tootizard is not online. tootizard
Joined: 26 Jul 2010
Total Posts: 11
26 Jul 2011 04:19 PM
please can i have some help


thanks
Report Abuse
alexmach1 is not online. alexmach1
Joined: 02 May 2008
Total Posts: 1977
26 Jul 2011 08:30 PM
wrong place tootizard *facepalm*
Report Abuse
yankee027 is not online. yankee027
Joined: 03 Dec 2008
Total Posts: 341
26 Jul 2011 09:04 PM
You should be starting a new topic not in this one.
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