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: Will this work?

Previous Thread :: Next Thread 
Droben is not online. Droben
Joined: 18 Nov 2012
Total Posts: 54
18 Aug 2013 09:22 PM
shirtid = 1234
pantsid = 1234

game.Players.PlayerAdded:connect(function(Player)
If p == "Character" then
If player.Character then
wait(1)
local char = player.Character
Instance.new.Object.Shirt
Instance.new.Object.Pants

trying to make a script that spawns new clothing on the player when they spawn for a friend
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
18 Aug 2013 09:25 PM
Put into local script


shirtid = 1234
pantsid = 1234
player = game.Players.LocalPlayer

game.Players.PlayerAdded:connect(function(Player)
If p == "Character" then
If player.Character then
wait(1)
player.Character.Shirt:remove()
player.Character.Pants:remove()
local char = player.Character
local shirt = Instance.new("Shirt",char)
local pants = Instance.new("Pants",char)

That would be my guess but I dont know for sure
Report Abuse
ferboterbo is not online. ferboterbo
Joined: 08 Feb 2010
Total Posts: 17818
18 Aug 2013 09:26 PM
No no no, not today

das the power of ferbo engineering
http://www.youtube.com/watch?v=JHAewy-1aDw&feature=youtu.be
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
18 Aug 2013 09:28 PM
Dont know what I was thinking I didnt put shirtid or paintsid in...
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
18 Aug 2013 09:31 PM
shirtid = 1234
pantsid = 1234
player = game.Players.LocalPlayer

game.Players.PlayerAdded:connect(function(Player)
If p == "Character" then
If player.Character then
wait(1)
player.Character.Shirt:remove()
player.Character.Pants:remove()
local char = player.Character
local shirt = Instance.new("Shirt",char)
local pants = Instance.new("Pants",char)
shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=1234"
pants.PantsTemplate = "http://www.roblox.com/asset/?id=1234"
Report Abuse
Droben is not online. Droben
Joined: 18 Nov 2012
Total Posts: 54
18 Aug 2013 09:32 PM
Bump
Report Abuse
Droben is not online. Droben
Joined: 18 Nov 2012
Total Posts: 54
18 Aug 2013 09:43 PM
Wait are you sure that script will work?
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
18 Aug 2013 09:57 PM
No, Not at all
Report Abuse
Alexrocksdude is not online. Alexrocksdude
Joined: 19 Jan 2011
Total Posts: 3828
18 Aug 2013 10:14 PM
Why on earth do you guys use :Remove() over :destroy()???
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
18 Aug 2013 10:17 PM
I started scripting with remove, When it comes to Lua, Its like second nature
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
18 Aug 2013 10:22 PM
I don't see how it would work at all if you didn't end the if statements (that shouldn't be capitalized) and the function.
Report Abuse
Ekkoh is not online. Ekkoh
Joined: 22 Oct 2012
Total Posts: 524
18 Aug 2013 10:22 PM
Try this out.

    local shirtId = 1234
    local pantsId = 1234
    
    Game.Players.PlayerAdded:connect(function(plr)
    plr.PlayerAdded:connect(function(char)
    local shirt = char:FindFirstChild('Shirt') or Instance.new('Shirt', char)
    local pants = char:FindFirstChild('Pants') or Instance.new('Pants', char)
    shirt.ShirtId = 'http://www.roblox.com/asset/?id='..tostring(shirtId)
    pants.PantsId = 'http://www.roblox.com/asset/?id='..tostring(pantsId)
    end)
    end)
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
18 Aug 2013 10:24 PM
^ thats exactly what I did
Report Abuse
Droben is not online. Droben
Joined: 18 Nov 2012
Total Posts: 54
18 Aug 2013 10:25 PM
Sorry, Im really confused. So I replace :remove() with :destroy() and add 4 ends?
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
18 Aug 2013 10:26 PM
You dont have to replace :remove()
Report Abuse
Ekkoh is not online. Ekkoh
Joined: 22 Oct 2012
Total Posts: 524
18 Aug 2013 10:27 PM
@mad Yours gave me a headache it was so poorly written and incorrect.
Report Abuse
Droben is not online. Droben
Joined: 18 Nov 2012
Total Posts: 54
18 Aug 2013 10:27 PM
Whoops! Didn't see the posts above
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
18 Aug 2013 10:28 PM
@Ekkoh, Eh. I hadn't really red it over, Like I said I dont know if it will work.
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
18 Aug 2013 10:28 PM
It wouldn't have, how was that even remotely similar to Ekkohs?
Report Abuse
Ekkoh is not online. Ekkoh
Joined: 22 Oct 2012
Total Posts: 524
18 Aug 2013 10:29 PM
You really shouldn't attempt to give help if you don't know what you're doing, it only further confuses the OP.
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
18 Aug 2013 10:33 PM
^Your probably right. But I was the only one even giving an effort to help for like 30 minutes
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