LordRaig
|
  |
| Joined: 01 Aug 2011 |
| Total Posts: 129 |
|
|
| 03 Sep 2011 12:14 PM |
I cant script at ALL but I know this is the basics. I just dont know how to put it. Since I dont know I will just put how I know it will look. I think you uderstand what I am trying to do but I dont know the wording.
If teamname= Blue onTouch instance.new explosion
I dont know what to do... Please help, Dont troll me please. Also how would I put it if I want the person that exploded the other person to get a point and the person that got exploded loses a point. Also how do I make the explosion breakjoints?
Thank you
-L. Raig |
|
|
| Report Abuse |
|
|
|
| 03 Sep 2011 12:20 PM |
function onTouch(hit)
if game.Players:GetPlayerFromCharacter(hit.Parent.Name).TeamColor == "(Bright blue or Really blue?") then
e = Instance.new("Explosion",workspace) e.Position = hit.Parent:FindFirstChild("Torso").Position--may have to use Vector3's e.BlastPressure = number between 1000 and 9999999999999999999999999 e.BlastRadius = (a number)-This determines how much area the explosion affects. wait(1) e:remove() end end
script.Parent.Touched:connect(onTouched)
And please, learn from this scdript. |
|
|
| Report Abuse |
|
|
LordRaig
|
  |
| Joined: 01 Aug 2011 |
| Total Posts: 129 |
|
|
| 03 Sep 2011 12:21 PM |
| Ok thanks :) I see this forum is not full of all trolls |
|
|
| Report Abuse |
|
|
Fredfishy
|
  |
| Joined: 21 Mar 2009 |
| Total Posts: 4197 |
|
|
| 03 Sep 2011 12:25 PM |
function onTouched(hit) char = hit.Parent -- Find the character that touched the brick player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent) -- Try to find his player if player ~= nil then -- If we can find his player then, if player.TeamColor == BrickColor.new("Bright blue") then -- Check if he's blue, and if he is, e = Instance.new("Explosion", Workspace) -- Explode his face e.Position = script.Parent.Position -- At the position of the brick this script is in e.BlastPressure = 1000 -- With this much pressure (how powerful the explosion is, how much it moves bricks) e.BlastRadius = 1 -- With this radius (what radius around the explosion is affected) end end end
script.Parent.Touched:connect(onTouched) -- Tell it to run that function up there ^^ when the brick is hit. |
|
|
| Report Abuse |
|
|
Aurarus
|
  |
| Joined: 22 Dec 2008 |
| Total Posts: 4761 |
|
|
| 03 Sep 2011 12:27 PM |
The script doesn't know exactly what teamname is.
Scripts are incredibly picky and need to be precise. Spelling is also a big issue. They work in a higharchy (<-- spelling fail) system. Go to the wiki (Or send me a PM) if you'd like to know more of this stuff precisely :o
But for this script you'll need a "Listening event," an event to trigger the script to run.
They are usually in formats such as: script.Parent.Touched:connect(function'sname)
Basicaly like: Findtheobjectwhichthenextwordwillbetheeventof.EventorAction:connect(Thenameofthefunctionwhichyouwantran)
Now back to making the script understand what "teamname" is exactly...
This will take way too long to explain, but this is how it will look like: if game.Players:findFirstChild(hit.Name).Team.Name == "Blue"
The things I'd like to note from that is: If statements NEED 2 symbols/ equal signs.
The first symbol can be one of the following: ~, =, >, <, and there are a few more which I'm not remembering. These are basically saying "Is not","Is","Is greater than","Is less than." Again, PM me or go to the wiki for more info.
For the Instance.new part, it needs to be
explosion = Instance.new("Explosion")
And then you need to give the explosion a parent so it knows where to appear.
explosion.Parent = hit.Parent.Torso --The torso of the person who touched this brick |
|
|
| Report Abuse |
|
|
Fredfishy
|
  |
| Joined: 21 Mar 2009 |
| Total Posts: 4197 |
|
|
| 03 Sep 2011 12:28 PM |
| Take my script and read the comments, then read Aura's tutorial. If you can only do one, read his tut. It will help you much more in the future. |
|
|
| Report Abuse |
|
|
LordRaig
|
  |
| Joined: 01 Aug 2011 |
| Total Posts: 129 |
|
|
| 03 Sep 2011 12:29 PM |
| I did. It helped. I am happy I forumed and didnt get trolled for not understanding scripting :) |
|
|
| Report Abuse |
|
|
LordRaig
|
  |
| Joined: 01 Aug 2011 |
| Total Posts: 129 |
|
|
| 03 Sep 2011 12:30 PM |
| But those any of those scripts break joints? I dont know how I would put it. How would I make it break joints and only kill the blue team and not the team of the person that exploded the other person? |
|
|
| Report Abuse |
|
|
|
| 03 Sep 2011 12:31 PM |
| if you dont wanna pay people you can go to roblox wikki you know and if you learn poof scripting for free |
|
|
| Report Abuse |
|
|
LordRaig
|
  |
| Joined: 01 Aug 2011 |
| Total Posts: 129 |
|
|
| 03 Sep 2011 12:34 PM |
| I know but it gives cruddy examples... Ok so back to what I was saying; There is 2 teams; Blue and Red. I want it to make it so if someone from blue explodes red blue doesnt die but red does. The person that got exploded gets a point lower and the person that exploded him gets a point higher. I was also hoping it would break joints around him. |
|
|
| Report Abuse |
|
|
|
| 03 Sep 2011 12:46 PM |
| Most of the time, LordRaig, a strong explosion will "BreakJoints." |
|
|
| Report Abuse |
|
|
LordRaig
|
  |
| Joined: 01 Aug 2011 |
| Total Posts: 129 |
|
|
| 03 Sep 2011 01:23 PM |
| Oh Ok thank you :) but will the person that exploded the other die too? |
|
|
| Report Abuse |
|
|
Fredfishy
|
  |
| Joined: 21 Mar 2009 |
| Total Posts: 4197 |
|
|
| 03 Sep 2011 01:40 PM |
| @Radio, the only time an explosion will not "break joints" is if it doesn't hit you or if you have a FF. |
|
|
| Report Abuse |
|
|
|
| 03 Sep 2011 01:44 PM |
| @fred fishy and if you make the blast pressure 0 |
|
|
| Report Abuse |
|
|
|
| 03 Sep 2011 01:47 PM |
Lord, everyone here is happy to help. As long as you don't give us a reason to troll you, we will not. Just do not ask for something to be made for you. If we see that you've tried to make the script, we will attempt to help you in every way possible.
|
|
|
| Report Abuse |
|
|
LordRaig
|
  |
| Joined: 01 Aug 2011 |
| Total Posts: 129 |
|
|
| 03 Sep 2011 02:52 PM |
| :) Thank you all for making my first day on the forums so awesome! |
|
|
| Report Abuse |
|
|