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: Help!

Previous Thread :: Next Thread 
longlyrod1604 is not online. longlyrod1604
Joined: 13 Apr 2013
Total Posts: 1512
18 Oct 2014 01:35 PM
How can I script a gun turret with seat?

Turret is already model
Report Abuse
ToxicDominator is not online. ToxicDominator
Joined: 24 Oct 2013
Total Posts: 8373
18 Oct 2014 01:36 PM
gun.turret = true
shoot.kill_person = true
add.seat = true



Look at the Wiki.
Report Abuse
longlyrod1604 is not online. longlyrod1604
Joined: 13 Apr 2013
Total Posts: 1512
18 Oct 2014 01:40 PM
I need some more simple steps pls
Report Abuse
soniclover88888 is not online. soniclover88888
Joined: 01 Feb 2008
Total Posts: 6723
18 Oct 2014 01:43 PM
I hear the Wiki, which you were JUST referred to, has simple steps. Give it a try!

i'm a spooky ghost
Report Abuse
HyroadCoder is not online. HyroadCoder
Joined: 15 Jul 2014
Total Posts: 813
18 Oct 2014 01:46 PM
Raycasting
Report Abuse
longlyrod1604 is not online. longlyrod1604
Joined: 13 Apr 2013
Total Posts: 1512
18 Oct 2014 01:53 PM
what do i type in wiki to find the turret thingy
Report Abuse
HyroadCoder is not online. HyroadCoder
Joined: 15 Jul 2014
Total Posts: 813
18 Oct 2014 08:27 PM
Oh yeah, they have a specific 'How to build and script a turret' document on the wiki. ._.
Report Abuse
anthonya60 is not online. anthonya60
Joined: 26 Jan 2013
Total Posts: 18
18 Oct 2014 08:29 PM
There are a lot of complex and hard ways to do it, but if you want the easiest and simplest way you should just add a seat and have a click detector near it that launches objects. I'm new to scripting so I can't really help that much ._.
Report Abuse
HyroadCoder is not online. HyroadCoder
Joined: 15 Jul 2014
Total Posts: 813
18 Oct 2014 09:29 PM
Using projectiles instead of raycasting could be easier.
Have a script fire when the character sits. Then make it have reload, variables and stuff. Make it fire bullets at the mouse' position.


local human = script.Parent.Humanoid.TargetPoint
local lookAt = (human - game.Workspace.Turret1.BarrelPosition.Position).unit

local v = lookAt

local p = Instance.new("Part")
p.Velocity = v * 300

This is an example of how you fire a part in the direction of the mouse. I think I did it right. BarrelPosition is where you want the part to spawn at.
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