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: Basic script (Helps)

Previous Thread :: Next Thread 
assassincreed722 is not online. assassincreed722
Joined: 20 Mar 2013
Total Posts: 78
10 Jul 2013 06:56 AM
To punish a player say game.Workspace.Name:Remove()
To kick a player say game.Players.Name:Remove()
To do something with a brick for example game.Workspace.Baseplate:Remove()
Thats the remove scripts basic thank you :D
Report Abuse
TheAwesomenessDude is not online. TheAwesomenessDude
Joined: 17 Jul 2011
Total Posts: 11602
10 Jul 2013 07:09 AM
Use Destroy(), not Remove().

Remove() is deprecated.
Report Abuse
nise45 is not online. nise45
Joined: 17 Nov 2008
Total Posts: 7002
10 Jul 2013 07:10 AM
I use Remove and it still works, what's the issue?

~ I'm cool, deal with it.
Report Abuse
TheAwesomenessDude is not online. TheAwesomenessDude
Joined: 17 Jul 2011
Total Posts: 11602
10 Jul 2013 07:12 AM
It's not as good as Destroy(), efficiency-wise.

However it still works.
Report Abuse
DrWaffler is not online. DrWaffler
Joined: 16 Sep 2011
Total Posts: 4248
10 Jul 2013 07:19 AM
:Remove() parents it into nil

If there are scripts in it, they still run. The bricks are still counted as 'there' by the server, and are factored into the game. They are still a part of the game, and you could, theoretically, interact with them still.

:Destroy() gets rid of the object entirely.

:Remove() has it's uses still, but for removing items from the game you no longer want, use :Destroy()
Report Abuse
TheAwesomenessDude is not online. TheAwesomenessDude
Joined: 17 Jul 2011
Total Posts: 11602
10 Jul 2013 07:21 AM
':Destroy() gets rid of the object entirely.'

Not entirely.

It's still there somewhere, but it is still more efficient than remove.
Report Abuse
dewd45 is not online. dewd45
Joined: 08 Mar 2009
Total Posts: 11180
10 Jul 2013 07:27 AM
NONONONO ALL WRONG!!!
You wanna do something like this!

game.Workspace.Thenoob'sname.Head:remove()

-the dewd disease origin
Report Abuse
assassincreed722 is not online. assassincreed722
Joined: 20 Mar 2013
Total Posts: 78
11 Jul 2013 03:58 AM
No no no it both works its up to you to use Remove() Or Destory()
Report Abuse
sycips is not online. sycips
Joined: 21 Mar 2011
Total Posts: 1368
11 Jul 2013 04:28 AM
If youre a clean scripter, for example if you disabled useless scripts and disconnent connectionlines you dont use, then :remove() does the job for you. Although, I agree that most people should use it, especially the once who are still learning lua!

~sycips~
Report Abuse
assassincreed722 is not online. assassincreed722
Joined: 20 Mar 2013
Total Posts: 78
11 Jul 2013 05:38 AM
I agree too.
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
11 Jul 2013 05:44 AM
To punish a player in admin scripts it parents the character to lighting. To upunish parents it back to workspace. If you remove the character the only way to get unpunished is respawn by doing game.Players.name:LoadCharacter()
Report Abuse
sycips is not online. sycips
Joined: 21 Mar 2011
Total Posts: 1368
11 Jul 2013 03:08 PM
That's not true! That's only when you use :Destroy()! (I think...) Look and try this in your own studio:

Game.Players.PlayerAdded:connect(function(pl) print("PlayerAdded worked") --because most of the time this event doesnt work in play solo mode...
pl.CharacterAdded:connect(function(ch)
local savedcharacter = ch
c:remove()
wait(2)
ch.Parent = workspace --TADA! :P
end)
end)

Enjoy :)

~sycips~
Report Abuse
assassincreed722 is not online. assassincreed722
Joined: 20 Mar 2013
Total Posts: 78
12 Jul 2013 07:10 AM
game.Workspace.baseplate.Transparency = 1
Report Abuse
assassincreed722 is not online. assassincreed722
Joined: 20 Mar 2013
Total Posts: 78
12 Jul 2013 07:13 AM
I forgot so many scripts that i made cause of 1 month not playing roblox but i forgot many scripts im trying to remember 1 like hologram script and ragdoll
Report Abuse
TheAwesomenessDude is not online. TheAwesomenessDude
Joined: 17 Jul 2011
Total Posts: 11602
12 Jul 2013 07:46 AM
@sycips

You made a typo and said 'c:remove()' instead of 'ch:remove()'.

Also, you need MakeJoints() somewhere in there, the player will die.
Report Abuse
sycips is not online. sycips
Joined: 21 Mar 2011
Total Posts: 1368
12 Jul 2013 10:08 AM
Yes, sorry I made a Typo, and no, you dont have to make joints, because the joints have never been broken by the script!
Report Abuse
assassincreed722 is not online. assassincreed722
Joined: 20 Mar 2013
Total Posts: 78
12 Jul 2013 09:55 PM
Yep.
Report Abuse
assassincreed722 is not online. assassincreed722
Joined: 20 Mar 2013
Total Posts: 78
12 Jul 2013 11:03 PM
When i put my map changer script it gives me unexpected Error But know how to make a team starter pack?
Report Abuse
assassincreed722 is not online. assassincreed722
Joined: 20 Mar 2013
Total Posts: 78
16 Jul 2013 04:45 AM
Yo forum ish dying ;3
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