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 need help for this

Previous Thread :: Next Thread 
InfraredChasm is not online. InfraredChasm
Joined: 19 Jun 2011
Total Posts: 1097
05 Sep 2014 06:02 PM
I'm trying to make a skill that insta-kills people. The only problem is that I have no idea of how to spawn a collidable brick where the player is standing. Here's the current script I have.


Player = game.Players.Player1
mouse = Player:GetMouse()

function onKeyDown(key)
key = key:lower()
if key == "p" then
x = Instance.new("Part", Workspace)
x.BrickColor = BrickColor.new("Bright red")
x.Size = Vector3.new(60, 60, 60)
x.Shape = "Cylinder"
x.TopSurface = "Smooth"
x.BottomSurface = "Smooth"
x.Position = Vector3.new(0, 0, 0)
x.Anchored = true
x.Parent = Workspace
x.Rotation = Vector3.new(0,0,90)
end
end

mouse.KeyDown:connect(onKeyDown)
Report Abuse
InfraredChasm is not online. InfraredChasm
Joined: 19 Jun 2011
Total Posts: 1097
05 Sep 2014 06:10 PM
Someone? Help?
Report Abuse
InfraredChasm is not online. InfraredChasm
Joined: 19 Jun 2011
Total Posts: 1097
05 Sep 2014 06:14 PM
Also, I want people to freeze when they touch the red brick. I already made a function...

function onTouch(hit)

end
Report Abuse
InfraredChasm is not online. InfraredChasm
Joined: 19 Jun 2011
Total Posts: 1097
05 Sep 2014 06:34 PM
Come on I need help...
Report Abuse
InfraredChasm is not online. InfraredChasm
Joined: 19 Jun 2011
Total Posts: 1097
05 Sep 2014 07:20 PM
Help please e-e
Report Abuse
sloomingbla is not online. sloomingbla
Joined: 28 Jun 2008
Total Posts: 1109
05 Sep 2014 07:23 PM
x.Position = Player.Character.Head.Position

?

to freeze people just anchor the torso.
Report Abuse
InfraredChasm is not online. InfraredChasm
Joined: 19 Jun 2011
Total Posts: 1097
05 Sep 2014 07:35 PM
No I mean OTHER players that are touching the cylinder
Report Abuse
InfraredChasm is not online. InfraredChasm
Joined: 19 Jun 2011
Total Posts: 1097
05 Sep 2014 07:52 PM
Come on guys, I know that there's more than two people out there that are better at scripting at me...
Report Abuse
lordrambo is not online. lordrambo
Joined: 16 Jun 2009
Total Posts: 20628
05 Sep 2014 07:54 PM
Okay well are you trying to kill the player that is pressing the key?
Report Abuse
devKorniak is not online. devKorniak
Joined: 09 Aug 2013
Total Posts: 228
05 Sep 2014 07:56 PM
I know a MAJOR flaw your script has.

For the player variable, use game.Players.LocalPlayer and a LocalScript for the algorithm.

~ Dreams don't exist. It's yesterday tomorrow that does. ~
Report Abuse
InfraredChasm is not online. InfraredChasm
Joined: 19 Jun 2011
Total Posts: 1097
05 Sep 2014 08:03 PM
@lord No I just want to freeze EVERYONE that is touching the red cylinder

@dev I will use that if I want others to use it, I just want ME to be using it.
Report Abuse
InfraredChasm is not online. InfraredChasm
Joined: 19 Jun 2011
Total Posts: 1097
05 Sep 2014 08:20 PM
Guys?!?!
Report Abuse
lordrambo is not online. lordrambo
Joined: 16 Jun 2009
Total Posts: 20628
05 Sep 2014 08:21 PM
Okay well in the future try to be as clear as you can possibly be.

So you want to create a part when someone pressed a key, and then everyone who touches that part from then on out gets frozen, correct?
Report Abuse
InfraredChasm is not online. InfraredChasm
Joined: 19 Jun 2011
Total Posts: 1097
05 Sep 2014 09:44 PM
Bingo. Then I'm going to create an animation which makes my character go sky high in the air and come crashing down causing players inside the part to die.
Report Abuse
lordrambo is not online. lordrambo
Joined: 16 Jun 2009
Total Posts: 20628
05 Sep 2014 09:52 PM
Well it might be a little easier to make the part ahead of time then clone it and set the CFrame. Since you are using the mouse this should already be in a local script?

Part.CFrame = game.Players.LocalPlayer.Character.Torso.CFrame * CFrame.new(0,-2.5,0)

then you will have to make another function and fire it using the OnTouch event hooked up to the part.
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