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: How to make an OnEnter script?

Previous Thread :: Next Thread 
salacri is not online. salacri
Joined: 03 Jan 2013
Total Posts: 4576
02 Jun 2014 05:49 PM
Or whatever its called


Example:When you enter a game and your character changes to the ID of another character.

If you can help PM me and ill show you what im talking about.
Report Abuse
Xsysix is not online. Xsysix
Joined: 29 Mar 2014
Total Posts: 1182
02 Jun 2014 05:52 PM
PlayerID = 1 -- Change this to the ID of the player they change into.

game.Players.PlayerAdded:connect(Plr)
Plr.CharacterAdded:connect(function(Char)
Plr.CharacterAppearance = PlayerID
end)
end)

- Add 1.5k | Deplexity | its a lego men game stop worrying
Report Abuse
DrSaint is not online. DrSaint
Joined: 14 Oct 2009
Total Posts: 18429
02 Jun 2014 05:52 PM
@Xs

Ah, I was so close. I just didn't understand what to put for the last line. (New to scripting)
Report Abuse
Xsysix is not online. Xsysix
Joined: 29 Mar 2014
Total Posts: 1182
02 Jun 2014 05:53 PM
It's k, I think of myself as decently advanced and I didn't know about CharacterAppearance until last week.

- Add 1.5k | Deplexity | its a lego men game stop worrying
Report Abuse
DrSaint is not online. DrSaint
Joined: 14 Oct 2009
Total Posts: 18429
02 Jun 2014 05:55 PM
I was at

game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
charid=1
end)
end)

But I new the 3rd line was neither completed nor right to any extent, so I just kinda stood back and waited for someone to enlighten me too. Lol.
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
02 Jun 2014 05:57 PM
@Xy that doesnt work

local id=5
game.Players.PlayerAdded:connect(function(plr)
repeat wait() until plr.CharacterAppearance ~= ""
local app = tostring(plr.CharacterAppearance)
plr.CharacterAppearance = app:match("%D+")..id
end)
Report Abuse
salacri is not online. salacri
Joined: 03 Jan 2013
Total Posts: 4576
02 Jun 2014 06:01 PM
Hmmm.... do i need to place it in a backpack or something???


they seem to not work!
Report Abuse
Xsysix is not online. Xsysix
Joined: 29 Mar 2014
Total Posts: 1182
02 Jun 2014 06:04 PM
Hmm didn't know it was that complicated. Why do you have to do it that way?

- Add 1.5k | Deplexity | its a lego men game stop worrying
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
02 Jun 2014 06:07 PM
Because CharacterAppearance = 33868
will make you into a noob

btw 33868 is my id

and its a link, which it loadhttps to get the info needed to load character

i dont know the exact link so i had to do it that way
and also if you set it without a wait() at beginning it'll crash the player
Report Abuse
Xsysix is not online. Xsysix
Joined: 29 Mar 2014
Total Posts: 1182
02 Jun 2014 06:08 PM
Hmm, good to know.

- Add 1.5k | Deplexity | its a lego men game stop worrying
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