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: Moving Block

Previous Thread :: Next Thread 
WolfNovels is not online. WolfNovels
Joined: 19 Jun 2016
Total Posts: 22
06 Apr 2017 09:56 PM
I am trying to get a script that will make this one block Raise/Lower when you click on it, kind of like a elevator lift. Thanks! - Will pay if needed
Report Abuse
lmDepressed is not online. lmDepressed
Joined: 14 Feb 2017
Total Posts: 234
06 Apr 2017 11:34 PM
http://wiki.roblox.com/index.php?title=API:Class/ClickDetector
(Warning, does not work as intended from a server script, please use a local script for detecting the click and then send the information to a server script to have it do the work.
http://wiki.roblox.com/index.php?title=Remote_Events_and_Functions
)
http://wiki.roblox.com/index.php?title=CFrame
http://wiki.roblox.com/?title=Loops
https://www.roblox.com/library/727299395/red-gb
https://www.roblox.com/library/727304615/blue-gb
Report Abuse
Intended_Pun is not online. Intended_Pun
Joined: 10 Aug 2016
Total Posts: 4384
06 Apr 2017 11:42 PM
ClickDetectors work fine in server scripts.
Report Abuse
lmDepressed is not online. lmDepressed
Joined: 14 Feb 2017
Total Posts: 234
06 Apr 2017 11:50 PM
I was unaware they had fixed it.

https://www.roblox.com/library/727299395/red-gb
https://www.roblox.com/library/727304615/blue-gb
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
07 Apr 2017 12:19 AM
Yeah it's only been a year :)
Report Abuse
lmDepressed is not online. lmDepressed
Joined: 14 Feb 2017
Total Posts: 234
07 Apr 2017 12:31 AM
Do I look like someone who has been here recently?
I didn't think they were ever going to 'fix' them because they left them as is for so long, in fact I expected them to just make them "deprecated".
I'll still stick to my custom ones, more options = better, and I already have them made.

https://www.roblox.com/library/727299395/red-gb
https://www.roblox.com/library/727304615/blue-gb
Report Abuse
lmDepressed is not online. lmDepressed
Joined: 14 Feb 2017
Total Posts: 234
07 Apr 2017 12:34 AM
also its been a little over 8 months not a year

https://www.roblox.com/library/727299395/red-gb
https://www.roblox.com/library/727304615/blue-gb
Report Abuse
WolfNovels is not online. WolfNovels
Joined: 19 Jun 2016
Total Posts: 22
07 Apr 2017 12:40 AM
So how exactly do i do this
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
07 Apr 2017 12:46 AM
I round up because life's too short to care about clickdetectors
Report Abuse
lmDepressed is not online. lmDepressed
Joined: 14 Feb 2017
Total Posts: 234
07 Apr 2017 12:49 AM
if you are going to round everything up you could say it has been fixed for a decade.

http://www.roblox.com/library/727304615/blue-gb
https://www.roblox.com/library/727299395/red-gb
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
07 Apr 2017 12:55 AM
@OP loop dat ######## this script assumes 2 floors local moving, state = false, "up" -- does the elevator start up or down? local cd = script.Parent:WaitForChild("ClickDetector") -- a button not a part of the elevator model local elevator = workspace:WaitForChild("Elevator") -- a separate model altogether cd.MouseClick:connect(function() if moving then return end moving = true if state == "up" then state = "down" for i = 1, 100 do -- move the elevator down 100 studs elevator:SetPrimaryPartCFrame(elevator.PrimaryPart.CFrame*CFrame.new(0,-1,0) wait() end elseif state == "down" then state = "up" for i = 1, 100 do -- move the elevator up 100 studs elevator:SetPrimaryPartCFrame(elevator.PrimaryPart.CFrame*CFrame.new(0,1,0) wait() end end moving = false end)
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
07 Apr 2017 12:55 AM
pastebin /Pzpf4heA
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
07 Apr 2017 12:57 AM
.6666 does not round to 10
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
07 Apr 2017 12:57 AM
Usually not a good idea to do elevator stuff with CFrame since it won't update the physics of the parts on it/etc. so you end up with jittery movement and in the case of big steps, falling through the floor.
Report Abuse
lmDepressed is not online. lmDepressed
Joined: 14 Feb 2017
Total Posts: 234
07 Apr 2017 12:58 AM
it does however round up (like you said) to 10

it was a joke anyway though

http://www.roblox.com/library/727304615/blue-gb
https://www.roblox.com/library/727299395/red-gb
Report Abuse
lmDepressed is not online. lmDepressed
Joined: 14 Feb 2017
Total Posts: 234
07 Apr 2017 12:59 AM
I've had good results with cframing them and changing the velocity of parts touching it to go the direction the part is moving

http://www.roblox.com/library/727304615/blue-gb
https://www.roblox.com/library/727299395/red-gb
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
07 Apr 2017 01:00 AM
I noticed that phenomenon so I also move the CFrame of everything within the region of my elevator.
I assume Op doesn't care

@triggered number lady,
Are you one of those people who rounds to the nearest multiple of 10?
Cuz those people don't exist ^_^
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
07 Apr 2017 01:01 AM
Why not just BodyPosition though
Report Abuse
lmDepressed is not online. lmDepressed
Joined: 14 Feb 2017
Total Posts: 234
07 Apr 2017 01:02 AM
oops, I thought you said 8 months does not round to 10 years

why arbitrarily decide to round to 1 instead of 10, if you say its because its a closer unit of measurement, 9 months would be a closer round, and you still get to round to a 1 just a different 1

http://www.roblox.com/library/727304615/blue-gb
https://www.roblox.com/library/727299395/red-gb
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
07 Apr 2017 01:02 AM
My elevator is too phancy
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
07 Apr 2017 01:02 AM
I hope you're not one of those people who uses the word "arbitrarily" inappropriately.

Rounding to the nearest whole number is why people round to 1.
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
07 Apr 2017 01:03 AM
when given a decimal above >= .5

Report Abuse
lmDepressed is not online. lmDepressed
Joined: 14 Feb 2017
Total Posts: 234
07 Apr 2017 01:04 AM
'triggered number lady'

I was just trying to have a fun joke debate sorry you didn't like it

http://www.roblox.com/library/727304615/blue-gb
https://www.roblox.com/library/727299395/red-gb
Report Abuse
lmDepressed is not online. lmDepressed
Joined: 14 Feb 2017
Total Posts: 234
07 Apr 2017 01:05 AM
so why round to 1 year and not to 1 month then

http://www.roblox.com/library/727304615/blue-gb
https://www.roblox.com/library/727299395/red-gb
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
07 Apr 2017 01:05 AM
Shouldn't jokes be funny :P
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