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: Is it possible for this script to work ontouch?

Previous Thread :: Next Thread 
sup190 is not online. sup190
Joined: 31 Jan 2011
Total Posts: 2026
30 Jul 2016 08:10 PM
while true do
wait(1)
script.Parent.CFrame = script.Parent.CFrame + Vector3.new(1,0,0)


Report Abuse
Skellobit is not online. Skellobit
Joined: 13 Apr 2016
Total Posts: 12758
30 Jul 2016 08:11 PM
script.Parent.Touched:connect(function()
--
end)

Formerly ToxicDominator - add 17,509 posts
Report Abuse
sup190 is not online. sup190
Joined: 31 Jan 2011
Total Posts: 2026
30 Jul 2016 08:15 PM
^^ dont work


Report Abuse
Skellobit is not online. Skellobit
Joined: 13 Apr 2016
Total Posts: 12758
30 Jul 2016 08:16 PM
It's an event that fires when the object is touched. There's an issue with your code

Formerly ToxicDominator - add 17,509 posts
Report Abuse
sup190 is not online. sup190
Joined: 31 Jan 2011
Total Posts: 2026
30 Jul 2016 08:19 PM
It works on it's own but not with the touched function


Report Abuse
Skellobit is not online. Skellobit
Joined: 13 Apr 2016
Total Posts: 12758
30 Jul 2016 08:20 PM
can you post your code?

Formerly ToxicDominator - add 17,509 posts
Report Abuse
sup190 is not online. sup190
Joined: 31 Jan 2011
Total Posts: 2026
30 Jul 2016 08:26 PM
Basically I'm trying to make an inanimate object such as a bookshelf move across the room when you touch a trigger(scary game)and I have no other clue on how to achieve this so I'm testing out this script

script.Parent.Touched:connect(function()

while true do
wait(1)
script.Parent.CFrame = script.Parent.CFrame + Vector3.new(9,0,0)
wait(1)
script.Parent.CFrame = script.Parent.CFrame + Vector3.new(9,0,0)
wait(1)
end



Report Abuse
Skellobit is not online. Skellobit
Joined: 13 Apr 2016
Total Posts: 12758
30 Jul 2016 08:28 PM
You wouldn't use this for that instance. Look into debounce and repeat loops.

Formerly ToxicDominator - add 17,509 posts
Report Abuse
sup190 is not online. sup190
Joined: 31 Jan 2011
Total Posts: 2026
30 Jul 2016 08:36 PM
So would I use Part sliding?

http://wiki.roblox.com/index.php?title=Part_sliding

Would this help?


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