|
| 12 Oct 2011 04:14 AM |
I am creating an american revolution tribute as a place, but in a musket I just made, the bullet shoots, but will NOT go foreward. It has velocity, and all. Here is the script:
smoke = script.Parent.Muzzle.Smoke Tool = script.Parent VELOCITY = 60 loaded=false
local Bullet = Instance.new("Part") Bullet.Size = Vector3.new(0.2,0.2,0.2) Bullet.Shape = 0 Bullet.formFactor = ("Custom") Bullet.BrickColor = BrickColor.new("Really black") Bullet.Material = Enum.Material.Plastic Bullet.Locked = true Bullet.TopSurface = 0 Bullet.BottomSurface = 0
script.Parent.ballScript:clone().Parent = Bullet
function fire(v, shootDirect)
local vCharacter = Tool.Parent local vPlayer = game.Players:playerFromCharacter(vCharacter)
local head = vCharacter:findFirstChild("Head") if head == nil then return end
Tool.Handle.Fire:Play() local launch = head.Position + 10 * v
local missile = Bullet:clone() missile.CFrame = CFrame.new(launch,shootDirect) missile.Position = launch missile.Velocity = v * 300
local force = Instance.new("BodyForce") force.force = Vector3.new(0,98,0) force.Parent = missile
missile.ballScript.Disabled = false
missile.Parent = game.Workspace
end
function Recoil1() Tool.GripPos = Vector3.new(0,0,0.8) end
function Recoil2() Tool.GripPos = Vector3.new(0,0,1) end
function onEquipped()
Tool.Handle.Fire:Stop()
end
function onUnequipped()
Tool.Handle.Fire:Stop()
end
Tool.Equipped:connect(onEquipped) Tool.Unequipped:connect(onUnequipped)
enabled = true function onActivated() if not enabled then return end
enabled = false
local character = Tool.Parent; local humanoid = character.Humanoid if humanoid == nil then print("Failed to find Player's Humanoid") return end
local targetPos = humanoid.TargetPoint local lookAt = (targetPos - character.Head.Position).unit shootDirect = targetPos
local reload = .5
smoke.Enabled = true Recoil1() fire(lookAt, shootDirect) wait(reload) smoke.Enabled = false Recoil2() wait(reload)
enabled = true
end
script.Parent.Activated:connect(onActivated)
If you want to test it to see what happens, go to my place. I only have one place, I see no reason why I should post a link. |
|
|
| Report Abuse |
|
|
| |
|
|
| 12 Oct 2011 02:44 PM |
| Bump of - Thanks for ignoring my post. |
|
|
| Report Abuse |
|
|
|
| 12 Oct 2011 02:55 PM |
| Bump - realize it wasn't off of the page, but the further to the bottom it is, it is much less likely to be read.. |
|
|
| Report Abuse |
|
|
|
| 12 Oct 2011 02:56 PM |
Wheres the output?
-The guy with the siggy that little kids find inappropriate yet it isn't. |
|
|
| Report Abuse |
|
|
|
| 12 Oct 2011 02:57 PM |
| Everything works, the bullet just doesn't fly forward. If the output would have detected a problem, the gun wouldn't shoot at all. |
|
|
| Report Abuse |
|
|
|
| 12 Oct 2011 03:04 PM |
At the top - The initial scripts loaded After that - The scripts transfered to the bullet when shot (A few test shots)
Wed Oct 12 16:02:05 2011 - Running Script "Players.newnoahdain.Backpack.Musket.BallLauncher" Wed Oct 12 16:02:25 2011 - Running Script "Workspace.Part.ballScript" Wed Oct 12 16:02:30 2011 - Running Script "Workspace.Part.ballScript" Wed Oct 12 16:02:33 2011 - Running Script "Workspace.Part.ballScript" Wed Oct 12 16:02:37 2011 - Running Script "Workspace.Part.ballScript" Wed Oct 12 16:02:39 2011 - Running Script "Workspace.Part.ballScript" Wed Oct 12 16:02:40 2011 - Running Script "Workspace.Part.ballScript" |
|
|
| Report Abuse |
|
|
| |
|
veowe4
|
  |
| Joined: 29 May 2010 |
| Total Posts: 72 |
|
|
| 12 Oct 2011 03:29 PM |
| Hey there, Im no good with scripts, but I just played your game for a bit and I tried out the musket and the bullet does move. |
|
|
| Report Abuse |
|
|
|
| 12 Oct 2011 03:32 PM |
And then it freezes in place...
|
|
|
| Report Abuse |
|
|
| |
|
|
| 12 Oct 2011 03:56 PM |
| Do you see how fast it is? The bullet is unanchored, but it just acts as if it is anchored... |
|
|
| Report Abuse |
|
|
|
| 12 Oct 2011 04:32 PM |
| Yes. Thank you all for the help.................. (You better see the sarcasm in this.) |
|
|
| Report Abuse |
|
|
|
| 12 Oct 2011 04:33 PM |
| Truly though, thank you to the few that tried helping..... |
|
|
| Report Abuse |
|
|
dragon829
|
  |
| Joined: 12 Aug 2008 |
| Total Posts: 741 |
|
|
| 12 Oct 2011 04:34 PM |
| they tried giving you all the help they can dont be mad cause its not fixed i have alot of stuff people dont fix i dont care i try again later so dont be so upset |
|
|
| Report Abuse |
|
|
dragon829
|
  |
| Joined: 12 Aug 2008 |
| Total Posts: 741 |
|
| |
|
thatkane
|
  |
| Joined: 25 Feb 2011 |
| Total Posts: 17078 |
|
| |
|
| |
|
|
| 12 Oct 2011 05:11 PM |
@kane - No, I built it and scripted it myself
@ chunkyblox - Hell no! |
|
|
| Report Abuse |
|
|
thatkane
|
  |
| Joined: 25 Feb 2011 |
| Total Posts: 17078 |
|
| |
|
DeHata
|
  |
| Joined: 02 Oct 2011 |
| Total Posts: 617 |
|
|
| 13 Oct 2011 04:10 AM |
| And Lol, I remember writing it (newnoahdain is my alt...). |
|
|
| Report Abuse |
|
|
DeHata
|
  |
| Joined: 02 Oct 2011 |
| Total Posts: 617 |
|
|
| 13 Oct 2011 04:11 AM |
| Also, Why the hell would I steal a broken script? |
|
|
| Report Abuse |
|
|
DeHata
|
  |
| Joined: 02 Oct 2011 |
| Total Posts: 617 |
|
|
| 13 Oct 2011 06:37 AM |
| Please, humor me with your response to that. |
|
|
| Report Abuse |
|
|
thatkane
|
  |
| Joined: 25 Feb 2011 |
| Total Posts: 17078 |
|
|
| 13 Oct 2011 07:42 AM |
| Well i was at my friends house, and he was checking scripting forums. He said "OH MY GOD! That's my script!!" and i said "Hmm?" and he was histarical at a exact replica of his musket script. I'm not sure if you stole it or not, but i trusted my friend if you didn't make it. |
|
|
| Report Abuse |
|
|
DeHata
|
  |
| Joined: 02 Oct 2011 |
| Total Posts: 617 |
|
|
| 13 Oct 2011 08:40 AM |
| Well tell your friend, I mean no offense, but I am 100% Positive I made this. We may have similar scripts, but I am sure his works, while mine doesn't. |
|
|
| Report Abuse |
|
|