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: How do you script a script that changes velocity?

Previous Thread :: Next Thread 
Comets2224 is not online. Comets2224
Joined: 25 Nov 2014
Total Posts: 224
03 Jan 2016 12:07 AM
function onTouched(part)
game.Workspace.Track.Velocity = -50,0,0
end
game.Workspace.Track.Velocity = -50,0,0
end
script.Parent.Touched:connect(onTouched)

I tried it but when an object touched the sensor did not change the velocity on the track
Report Abuse
Comets2224 is not online. Comets2224
Joined: 25 Nov 2014
Total Posts: 224
03 Jan 2016 12:08 AM
Added a second end ._.
Report Abuse
Comets2224 is not online. Comets2224
Joined: 25 Nov 2014
Total Posts: 224
03 Jan 2016 12:09 AM
So I tried a new code without the 2nd end and it still does not work

function onTouched(part)
game.Workspace.Track.Velocity = -50,0,0
end
game.Workspace.Track.Velocity = -50,0,0
end
script.Parent.Touched:connect(onTouched)
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
03 Jan 2016 12:10 AM
function onTouched(part)
game.Workspace.Track.Velocity = Vector3.new(-50,0,0)
end
script.Parent.Touched:connect(onTouched)
Report Abuse
Comets2224 is not online. Comets2224
Joined: 25 Nov 2014
Total Posts: 224
03 Jan 2016 12:10 AM
I meant to post

function onTouched(part)
game.Workspace.Track.Velocity = -50,0,0
game.Workspace.Track.Velocity = -50,0,0
end
script.Parent.Touched:connect(onTouched)
Report Abuse
SparkIeFarts is not online. SparkIeFarts
Joined: 27 Sep 2008
Total Posts: 16166
03 Jan 2016 12:10 AM
Here u go

function onTouched(part)
game.Workspace.Track.Velocity = Vector3.new(-50,0,0)
end
game.Workspace.Track.Velocity = Vector3.new(-50,0,0)
script.Parent.Touched:connect(onTouched)


Report Abuse
Laedere is not online. Laedere
Joined: 17 Jun 2013
Total Posts: 23601
03 Jan 2016 12:11 AM
I think velocity takes vector3 values,

try
game.Workspace.Track.Velocity = Vector3.new(-50, 0, 0)


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