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: I've been trying to get help for hours!

Previous Thread :: Next Thread 
Ruinable is not online. Ruinable
Joined: 14 Sep 2014
Total Posts: 8903
04 Nov 2014 05:46 PM
help!
The bullet won't shoot more than a few studs when you're in First Person. Test it here
http://www.roblox.com/Ruinables-Place-Number-27-place?id=185535274
No, the Barrel is not inside a part, i tested this by withdrawing a few studs from the rest of the gun parts.



local tool = script.Parent
local user
local damage = 20

tool.Equipped:connect(function(mouse)
user = tool.Parent
mouse.Button1Down:connect(function()
local ray = Ray.new(tool.Barrel.CFrame.p, (mouse.Hit.p - tool.Barrel.CFrame.p).unit*300)
local hit, position = game.Workspace:FindPartOnRay(ray, user)
local humanoid = hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid")
if humanoid then
humanoid:TakeDamage(damage)
end
local distance = (position - tool.Barrel.CFrame.p).magnitude
local rayPart = Instance.new("Part", user)
rayPart.Name = "RayPart"
rayPart.BrickColor = BrickColor.new("Bright orange")
rayPart.Transparency = 0.5
rayPart.Anchored = false
rayPart.CanCollide = false
rayPart.TopSurface = Enum.SurfaceType.Smooth
rayPart.BottomSurface = Enum.SurfaceType.Smooth
rayPart.formFactor = Enum.FormFactor.Custom
rayPart.Size = Vector3.new(0.2, 0.2, 4)
rayPart.CFrame = CFrame.new(position, tool.Handle.CFrame.p) * CFrame.new(0, 0, -distance)
local bodyForce = Instance.new('BodyForce', rayPart)
bodyForce.Name = 'Antigravity'
bodyForce.force = Vector3.new(0, rayPart:GetMass() * 196.2, 0)
rayPart.Velocity = rayPart.CFrame.lookVector * -500
tool.Handle.Fire:Play()
end)
end)

gr8 b8 on a sl8 pl8 of f8 m8 | ( ͡° ͜ʖ ͡°)
Report Abuse
Ruinable is not online. Ruinable
Joined: 14 Sep 2014
Total Posts: 8903
04 Nov 2014 06:03 PM
I see all these views ya know guys. Post. something.

gr8 b8 on a sl8 pl8 of f8 m8 | ( ͡° ͜ʖ ͡°)
Report Abuse
xolbStudios is not online. xolbStudios
Joined: 05 Nov 2009
Total Posts: 504
04 Nov 2014 06:05 PM
Uhmmm. WELL.
That's because you're firing backwards.
Report Abuse
Ruinable is not online. Ruinable
Joined: 14 Sep 2014
Total Posts: 8903
04 Nov 2014 06:10 PM
The part is backwards idk

gr8 b8 on a sl8 pl8 of f8 m8 | ( ͡° ͜ʖ ͡°)
Report Abuse
shooter06 is not online. shooter06
Joined: 13 Jan 2011
Total Posts: 7443
04 Nov 2014 06:11 PM
Its because you parent it to the player, therefor adding it to the list of transparent things when you zoom in.
Parent it to workspace


print("Hello World!")
Report Abuse
Ruinable is not online. Ruinable
Joined: 14 Sep 2014
Total Posts: 8903
04 Nov 2014 06:14 PM
[ Content Deleted ]
Report Abuse
Ruinable is not online. Ruinable
Joined: 14 Sep 2014
Total Posts: 8903
04 Nov 2014 06:15 PM
Umm, hope it wouldn't be too much trouble, but how to I make the gun automatic, so as long as I'm holding down mousebutton 1, it will shoot?

gr8 b8 on a sl8 pl8 of f8 m8 | ( ͡° ͜ʖ ͡°)
Report Abuse
shooter06 is not online. shooter06
Joined: 13 Jan 2011
Total Posts: 7443
04 Nov 2014 06:15 PM
Not like anyone pays attention to the game mechanics anyways....


print("Hello World!")
Report Abuse
shooter06 is not online. shooter06
Joined: 13 Jan 2011
Total Posts: 7443
04 Nov 2014 06:16 PM
make a loop that checks if the mousebutton1 is down then it creates new raycasts (assuming thats what you used) repeatedly and keeps looping for checks


or look at fm code


print("Hello World!")
Report Abuse
anaIyze is not online. anaIyze
Joined: 29 May 2014
Total Posts: 2048
04 Nov 2014 06:21 PM
`.unit*300`
.unit`
`*300`


-_-
Report Abuse
shooter06 is not online. shooter06
Joined: 13 Jan 2011
Total Posts: 7443
04 Nov 2014 06:23 PM
hi analyze


print("Hello World!")
Report Abuse
Ruinable is not online. Ruinable
Joined: 14 Sep 2014
Total Posts: 8903
04 Nov 2014 06:24 PM
@Shooter, I changed the MouseButton1Down:connect(function() to

while mouse.Button1Down:connect() do

And now it just shoots while it's equipped
wot do

gr8 b8 on a sl8 pl8 of f8 m8 | ( ͡° ͜ʖ ͡°)
Report Abuse
anaIyze is not online. anaIyze
Joined: 29 May 2014
Total Posts: 2048
04 Nov 2014 06:24 PM
hai
Report Abuse
shooter06 is not online. shooter06
Joined: 13 Jan 2011
Total Posts: 7443
04 Nov 2014 06:25 PM
"look at fms"
"check if mousebutton1 is down"


print("Hello World!")
Report Abuse
Ruinable is not online. Ruinable
Joined: 14 Sep 2014
Total Posts: 8903
04 Nov 2014 06:27 PM
i hate using FMs.

gr8 b8 on a sl8 pl8 of f8 m8 | ( ͡° ͜ʖ ͡°)
Report Abuse
shooter06 is not online. shooter06
Joined: 13 Jan 2011
Total Posts: 7443
04 Nov 2014 06:28 PM
"look at fms"
"LOOK"
not use
"LOOK"


print("Hello World!")
Report Abuse
anaIyze is not online. anaIyze
Joined: 29 May 2014
Total Posts: 2048
04 Nov 2014 06:29 PM
well how else would you learn you dumb noob
Report Abuse
Ruinable is not online. Ruinable
Joined: 14 Sep 2014
Total Posts: 8903
04 Nov 2014 06:42 PM
^ wiki m8

gr8 b8 on a sl8 pl8 of f8 m8 | ( ͡° ͜ʖ ͡°)
Report Abuse
anaIyze is not online. anaIyze
Joined: 29 May 2014
Total Posts: 2048
04 Nov 2014 06:50 PM
where will you turn when you want to start baking something other than basic
Report Abuse
Ruinable is not online. Ruinable
Joined: 14 Sep 2014
Total Posts: 8903
04 Nov 2014 06:53 PM
Scripting helpers. ( ͡° ͜ʖ ͡°)

gr8 b8 on a sl8 pl8 of f8 m8 | ( ͡° ͜ʖ ͡°)
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
04 Nov 2014 06:53 PM
I told you how to fix it
http://www.roblox.com/Forum/ShowPost.aspx?PostID=149185361
Report Abuse
lordrambo is not online. lordrambo
Joined: 16 Jun 2009
Total Posts: 20628
04 Nov 2014 06:54 PM
You should only make a new thread as a last result. Try searching Scripting Helpers, definitely look at free models, wiki, whatever it takes. The way I saw it was, I was inconveniencing everyone else when I made a thread.
Report Abuse
Ruinable is not online. Ruinable
Joined: 14 Sep 2014
Total Posts: 8903
04 Nov 2014 06:55 PM
Your thing did no help

how to make auto.
?

gr8 b8 on a sl8 pl8 of f8 m8 | ( ͡° ͜ʖ ͡°)
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
04 Nov 2014 06:56 PM
The problem is the anchored brick is flying away because its spawned inside the tool

anchor the brick and CFrame it to where you want it
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