|
| 18 Oct 2014 01:35 PM |
How can I script a gun turret with seat?
Turret is already model |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2014 01:36 PM |
gun.turret = true shoot.kill_person = true add.seat = true
Look at the Wiki. |
|
|
| Report Abuse |
|
|
|
| 18 Oct 2014 01:40 PM |
| I need some more simple steps pls |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
| |
|
|
| 18 Oct 2014 01:53 PM |
| what do i type in wiki to find the turret thingy |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|