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 this script correct?

Previous Thread :: Next Thread 
k9sofcatville is not online. k9sofcatville
Joined: 25 Dec 2014
Total Posts: 2178
17 Feb 2015 04:25 PM
I am beginner scripter, I started scripting yesterday, no this isn't a script I read about, I made it on my own.
If you can't tell, I am trying to make it so I can step on Blob and Part will rise. It does nothing at all. What should the parent of the script be? Blob,Part,or Workspace?
blob = game.Workspace.Blob
part = game.Workspace.Part
function onTouch(part)
wait(1)
blob.Position = Vector3.new (-31,1.5,48)
wait(1)
blob.Position = Vector3.new (-31,2.5,48)
wait(1)
blob.Position = Vector3.new (-31,3.5,48)
wait(1)
blob.Position = Vector3.new (-31,4.5,48)
wait(1)
blob.Position = Vector3.new (-31,5.5,48)
end

blob:connect()
part.Touched:connect(onTouch)
Report Abuse
cody123454321 is not online. cody123454321
Joined: 21 Nov 2009
Total Posts: 5408
17 Feb 2015 04:26 PM
http://wiki.roblox.com/index.php?title=Table
Report Abuse
k9sofcatville is not online. k9sofcatville
Joined: 25 Dec 2014
Total Posts: 2178
17 Feb 2015 04:29 PM
I don't know what that is :I. I am a very stupid beginner. My IQ is only 142 so I am not very smart, so I have no clue how that wiki page is related to whatI did. I don't even know what a string is, I just make the script...
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
17 Feb 2015 04:40 PM
well, i would use a bodyposition for something like that


but this would work i think

blob = game.Workspace.Blob
part = game.Workspace.Part
bodypos = part.BodyPosition
start = game.Workspace.Start -- make start a brick, this is where the part will start to move from
finish = game.Workspace.Finish -- make finish a brick, and put it where you want the part to stop

blob.Touched:connect(function(hit)
player = game.Players:GetPlayerFromCharacter(hit.Parent)

if player then
bodypos.position = start.Position
wait(5)
bodypos.position = finish.Position
wait(5)
end

end)

add a debounce too or it would get wonky
and i didn't test it but i think that would work

play around with the bodyposition properties as well
Report Abuse
k9sofcatville is not online. k9sofcatville
Joined: 25 Dec 2014
Total Posts: 2178
17 Feb 2015 04:49 PM
What should the Parent of the script be?
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
17 Feb 2015 04:51 PM
i don't think it would matter if you used a variant of my script

put it in ServerScriptStorage
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
17 Feb 2015 04:53 PM
also i think roblox made a hour of code video that uses BodyPosition, which would be useful in your case

check out all of the hour of code videos they made, you may learn something new


hour of code BodyPosition video:
https://www.youtube.com/watch?v=dqyJk0w2AY0

Report Abuse
k9sofcatville is not online. k9sofcatville
Joined: 25 Dec 2014
Total Posts: 2178
17 Feb 2015 04:57 PM
Wow. Frustrate me too much and I probably throw away what limited knowledge I gained over past 2 days.


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Report Abuse
SummerEquinox is not online. SummerEquinox
Joined: 25 Jun 2013
Total Posts: 2088
17 Feb 2015 05:04 PM
You don't have locals set in the beginning

~Stars for a siggy~
Report Abuse
k9sofcatville is not online. k9sofcatville
Joined: 25 Dec 2014
Total Posts: 2178
17 Feb 2015 05:09 PM
When i hit play, Blob doesn't get a "Touch Interest"
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