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: I'm a beginner help with this!

Previous Thread :: Next Thread 
Best1997 is not online. Best1997
Joined: 01 Apr 2012
Total Posts: 62
26 Jul 2012 03:38 PM
game.Workspace.Best1997.Head:Destroy()

Does not work?
Report Abuse
Mathfreak231 is not online. Mathfreak231
Joined: 21 Jun 2010
Total Posts: 5311
26 Jul 2012 03:42 PM
Are you playing solo?

Try in Online mode.

~This sig is false~
Report Abuse
Kirbykid02 is not online. Kirbykid02
Joined: 18 May 2009
Total Posts: 2671
26 Jul 2012 03:43 PM
Where are you using this script?
If in your place then:

while wait(1) do
a = Workspace:GetChildren()
for i = 1,# a do
if a[i].Name ==Best1997 then
a[i].Head:Destroy()
end
end
end
Report Abuse
Best1997 is not online. Best1997
Joined: 01 Apr 2012
Total Posts: 62
26 Jul 2012 03:44 PM
Won't work.

I inserted the script into workspace, saved and tried the game.

Won't work.. DX
Report Abuse
T3XT is not online. T3XT
Joined: 25 Jul 2011
Total Posts: 9233
26 Jul 2012 03:45 PM
Try visiting in regular Play mode instead of testing mode if that's what you're trying to do.

The place needs to see your username.
Report Abuse
Best1997 is not online. Best1997
Joined: 01 Apr 2012
Total Posts: 62
26 Jul 2012 03:45 PM
I just press play, it won't work...
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
26 Jul 2012 03:46 PM
Game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(char)
if player.Name == "Best1997" then
character:FindFirstChild("Head"):Destroy()
end
end)
end)

† KMXD †
Report Abuse
Kirbykid02 is not online. Kirbykid02
Joined: 18 May 2009
Total Posts: 2671
26 Jul 2012 03:46 PM
Did you insert the script in edit mode, then publish place?
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
26 Jul 2012 03:46 PM
Game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(char)
if player.Name == "Best1997" then
char:FindFirstChild("Head"):Destroy()
end
end)
end)

† KMXD †
Report Abuse
Best1997 is not online. Best1997
Joined: 01 Apr 2012
Total Posts: 62
26 Jul 2012 03:47 PM
I'm trying to understand scripting, not getting them. But thanks for posting them.. :I
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
26 Jul 2012 03:48 PM
Your script probably executes then errors, because it fires before your character loads.

† KMXD †
Report Abuse
T3XT is not online. T3XT
Joined: 25 Jul 2011
Total Posts: 9233
26 Jul 2012 03:50 PM
Wait a second

Did you create the script in Build or Edit mode?

Because you're supposed to do it in Edit mode.
Report Abuse
Best1997 is not online. Best1997
Joined: 01 Apr 2012
Total Posts: 62
26 Jul 2012 03:51 PM
Edit mode, I updated the game, saved it, made a model of it, cut it out and put it in again. It doesn't work...
Report Abuse
Kirbykid02 is not online. Kirbykid02
Joined: 18 May 2009
Total Posts: 2671
26 Jul 2012 03:52 PM
Where'd you test it? Play Solo or Play Mode?
Report Abuse
Best1997 is not online. Best1997
Joined: 01 Apr 2012
Total Posts: 62
26 Jul 2012 03:53 PM
Play mode.
Report Abuse
Kirbykid02 is not online. Kirbykid02
Joined: 18 May 2009
Total Posts: 2671
26 Jul 2012 03:53 PM
--Check if this works

while wait(1) do
a = game.Players:GetChildren()
for i = 1,# a do
a[i].Character.Head.Name = Dead
end
end
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
26 Jul 2012 03:54 PM
@Kirby

Your script wouldn't work...

† KMXD †
Report Abuse
Kirbykid02 is not online. Kirbykid02
Joined: 18 May 2009
Total Posts: 2671
26 Jul 2012 03:54 PM
wait(60)

while wait(1) do
a = game.Players:GetChildren()
for i = 1,# a do
a[i].Character.Head.Name = Dead
end
end
Report Abuse
Best1997 is not online. Best1997
Joined: 01 Apr 2012
Total Posts: 62
26 Jul 2012 03:55 PM
I want to understand basic scripting, not having free modeled ones...
Report Abuse
OwneD1991 is not online. OwneD1991
Joined: 16 Oct 2009
Total Posts: 12623
26 Jul 2012 03:55 PM
It is executing the script before your character loads.

Maybe you should try putting in this:

game:GetService('Players').PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
if player.Name == "YourNameHere" then
character.Humanoid.Health = 0 -- Three Ways To Kill A Person With Scripts
character:BreakJoints()
character.Head:Destroy()
Report Abuse
Kirbykid02 is not online. Kirbykid02
Joined: 18 May 2009
Total Posts: 2671
26 Jul 2012 03:55 PM
This isn't free-modelled, this is a simple script I am failing at :P
Report Abuse
OwneD1991 is not online. OwneD1991
Joined: 16 Oct 2009
Total Posts: 12623
26 Jul 2012 03:56 PM
Woops. Forgot my ends.

game:GetService('Players').PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
if player.Name == "YourNameHere" then
character.Humanoid.Health = 0 -- Three Ways To Kill A Person With Scripts
character:BreakJoints()
character.Head:Destroy()
end
end)
end)
Report Abuse
thek00lkid is not online. thek00lkid
Joined: 18 Jun 2011
Total Posts: 2778
26 Jul 2012 03:56 PM
game.Players.Player.Character.Head:Destroy()
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
26 Jul 2012 03:56 PM
@Best

Again, what I think is happening is that your character loads after the script runs, so it errors. Try using repeat wait() until your character loads.

† KMXD †
Report Abuse
Kirbykid02 is not online. Kirbykid02
Joined: 18 May 2009
Total Posts: 2671
26 Jul 2012 03:57 PM
At koolkid, your script executes before player loads....
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