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: LandMine Script.

Previous Thread :: Next Thread 
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
02 Aug 2012 01:36 PM
Example:

Click
Land mine on the ground
Walk up to it and BOOM

How I do that? (-the BOOM)

the Landmine will be in Lighting, so I just need to know how to make a script that will drop the landmine where you are at...

Script would look something like this...

function plant()
local bomb = Instance.new.Lighting("Can Bomb High Yield") --something like so.
bomb.Position = Vector3 --Don't know about this part
end
Report Abuse
TheEpicSamuri is not online. TheEpicSamuri
Joined: 04 Dec 2011
Total Posts: 1343
02 Aug 2012 01:39 PM
function onButtonClicked()
local mine = game.Lighting.LandMine:Clone()
mine.Parent = script.Parent.Parent.Parent.Parent.Head
end

script.Parent.MouseButton1Click:connect(onButtonClicked)

I would do a screen gui cause i like screen gui
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
02 Aug 2012 01:41 PM
Where would I put the " Can Bomb High Yield " at?
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
02 Aug 2012 01:47 PM
bump
Report Abuse
baxterknite is not online. baxterknite
Joined: 21 Nov 2008
Total Posts: 383
02 Aug 2012 01:50 PM
Put this in a local script and put it in a button. Assuming "Can Bomb High Yield" is the name of the landmine, and its in Lighting.



function onButtonClicked()
local kid = game.Players.LocalPlayer
local mine = game.Lighting["Can Bomb High Yield"]:Clone()
mine:MoveTo(kid.Character.Torso.Position + Vector3.new(0, -3.6, 0))
end

script.Parent.MouseButton1Click:connect(onButtonClicked)
Report Abuse
baxterknite is not online. baxterknite
Joined: 21 Nov 2008
Total Posts: 383
02 Aug 2012 01:55 PM
Wait, that's my bad, I forgot a part.
The script at the bottom should work.
Do you need a script for the actual landmine too?

function onButtonClicked()
local kid = game.Players.LocalPlayer
local mine = game.Lighting["Can Bomb High Yield"]:Clone()
mine:MoveTo(kid.Character.Torso.Position + Vector3.new(0, -3.6, 0))
mine.Parent = kid.Character
end

script.Parent.MouseButton1Click:connect(onButtonClicked)


Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
02 Aug 2012 01:58 PM
Uh... Sorry for not making my self clear.

I need this to be a tool... not a GUI...

and whats the " kid " for?

no I don't believe I need one for the landmine it self.
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
02 Aug 2012 02:09 PM
bump
Report Abuse
cursey is not online. cursey
Joined: 26 Aug 2008
Total Posts: 3042
02 Aug 2012 02:33 PM
So you want it to plant when you click?

then blow up when you step on it?
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
02 Aug 2012 02:37 PM
Exactly. just with wait(2) before someone can step on it and it explodes...
Report Abuse
cursey is not online. cursey
Joined: 26 Aug 2008
Total Posts: 3042
02 Aug 2012 02:46 PM
Will the mine have more than one block?

I may be wrong, but you could put the mine model in the Lighting, then have the tool just clone it and place it where your cursor is

You may need to look up how to do that, I have no idea
Report Abuse
LUVMARIOLUIGI10000 is not online. LUVMARIOLUIGI10000
Joined: 16 May 2009
Total Posts: 1244
02 Aug 2012 02:59 PM
Do you mean when you click on a GUI and touch it and it explodes or it has a ClickDetector so when you click it and touch it, it explodes?
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
02 Aug 2012 02:59 PM
10blocks for the mine...

Yes thats what I'm trying to do... is make a clone and the clone spawns on the ground next to you...
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
02 Aug 2012 03:00 PM
@Luv no GUIs please. Just leftmouse click and it drops and 3secs later you walk on it and it goes BOOM.
Report Abuse
LUVMARIOLUIGI10000 is not online. LUVMARIOLUIGI10000
Joined: 16 May 2009
Total Posts: 1244
02 Aug 2012 03:03 PM
So you mean just Click the Land Mine and 3 seconds later it explodes?
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
02 Aug 2012 03:05 PM
Example:

Noob behind you trying to keel u with a stick.
you left click and you land mine drops to your feet.
3 seconds later the noob touches it and goes BOOM.

Left click and the bomb falls to the ground and 3 sec later IF touched it explodes.
Report Abuse
baxterknite is not online. baxterknite
Joined: 21 Nov 2008
Total Posts: 383
02 Aug 2012 03:08 PM
Who gave the noob the stick? O_o
Report Abuse
LUVMARIOLUIGI10000 is not online. LUVMARIOLUIGI10000
Joined: 16 May 2009
Total Posts: 1244
02 Aug 2012 03:12 PM
Oh so you mean a tool.

function onTouched(hit)
boom = Instance.new("Explosion", workspace)
boom.Position = Vector3.new(math.random(1,10))
script.Parent:Remove()
end
script.Parent.Bomb.Touched:connect(onTouched)

--But you would have to have a Land Mine in the tool and you would put this script in the tool. Only part you would have to edit was the position.
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
02 Aug 2012 03:22 PM
@bat, I think he got it from a tree.

@Luv /\ that I can make. Its just the landmine spawner (Or firer??) that I need help with.

I think it might look like this a bit:

functionClick() --this is so nooby looking :(
drop tool
function.connect(Click)

--now your script

function onTouched(hit)
wait(3)
boom = Instance.new("Explosion", workspace)
boom.Position = Vector3.new(math.random(1,10))
script.Parent:Remove()
end
script.Parent.Bomb.Touched:connect(onTouched)
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
02 Aug 2012 03:43 PM
If I understand this correctly, you need to either remove the tool or parent from the player to make the land mine drop and become active right?
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
02 Aug 2012 04:43 PM
Bump to top.
Report Abuse
TheShoeBox is not online. TheShoeBox
Joined: 20 Aug 2010
Total Posts: 5022
02 Aug 2012 04:48 PM
function onClicked()
local kid = game.Players.LocalPlayer
local mine = game.Lighting["Can Bomb High Yield"]:Clone()
mine:MoveTo(kid.Character.Torso.Position + Vector3.new(0, -3.6, 0))
mine.Parent = kid.Character
end

script.Parent.MouseButton1Down:connect(onClicked)

You could run this in a certain way, I copied the one up above but changed to MouseButton1Down. You could equip a gui upon equipping the tool, just make sure visible is set to true and transparency is 1.
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
02 Aug 2012 04:56 PM
-_- no GUI's please... I don't need them...

Unless I HAVE to use a GUI for this. :/
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
02 Aug 2012 05:27 PM
nump
Report Abuse
GUESTHAXX is not online. GUESTHAXX
Joined: 16 Apr 2012
Total Posts: 3370
02 Aug 2012 05:48 PM
How would I script the land mine to be dropped once you clicked?
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