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 » Scripters
Home Search
 

Re: Velocity

Previous Thread :: Next Thread 
millymanks is not online. millymanks
Joined: 26 Jun 2014
Total Posts: 413
23 Apr 2015 04:30 PM
I made a script where when you push "e" the ball gets shot. The output says nothing and there's no syntax errors. Help please.

script:


plr=game.Players.LocalPlayer
mouse=plr:GetMouse()
ball=script.Parent
char=ball.Parent
hum=char:WaitForChild("Humanoid")
targetPos = hum.TargetPoint
v = (targetPos - char.Head.Position).unit
spawnPos = char.PrimaryPart.Position

mouse.KeyDown:connect(function(key)
if (key=="e") then
spawnPos=spawnPos+(v*5)
hum.Jump=true
wait()
ball.Parent=workspace
ball.Handle.Position=spawnPos
ball.Handle.Velocity=(v*ball.PowerValue.Value)+Vector3.new(0,50,0)
end
end)
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
23 Apr 2015 05:02 PM
You should learn to debug on your own..
print()

Try moving the script into PlayerGui
Report Abuse
sharpchain1 is not online. sharpchain1
Joined: 05 Aug 2013
Total Posts: 1009
23 Apr 2015 05:28 PM
Ok so u cant make a part move by setting the Parts velocity
you need to create an instance inside the part Called "BodyVelocity" you can look up more about it in the wiki
Report Abuse
millymanks is not online. millymanks
Joined: 26 Jun 2014
Total Posts: 413
23 Apr 2015 05:33 PM
@dark

It's a local script and it's in the PlayerGui.
Report Abuse
millymanks is not online. millymanks
Joined: 26 Jun 2014
Total Posts: 413
23 Apr 2015 05:34 PM
Actually it's in a tool.
Report Abuse
millymanks is not online. millymanks
Joined: 26 Jun 2014
Total Posts: 413
23 Apr 2015 05:42 PM
But how do i make it rise up or forward in mid air?
Report Abuse
FrostBiteFreshy is not online. FrostBiteFreshy
Joined: 10 Mar 2013
Total Posts: 263
23 Apr 2015 05:48 PM
BodyVelocity...
Report Abuse
millymanks is not online. millymanks
Joined: 26 Jun 2014
Total Posts: 413
23 Apr 2015 05:55 PM
In the BodyVelocity properties do i change the velocity to make the ball go farther or the P property?
Report Abuse
millymanks is not online. millymanks
Joined: 26 Jun 2014
Total Posts: 413
23 Apr 2015 05:57 PM
nvm i found the answer to that question.
Report Abuse
millymanks is not online. millymanks
Joined: 26 Jun 2014
Total Posts: 413
23 Apr 2015 06:01 PM
It says this in the output because of this part:

ball.BodyVelocity.velocity=Vector3.new(0,v,0)

19:00:38.685 - Workspace.Player1.LBA_Ball.shot:14: bad argument #2 to '?' (Vector3 expected, got number)


???
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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