|
| 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 |
|
|
|
| 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 |
|
|
|
| 06 Apr 2017 11:42 PM |
| ClickDetectors work fine in server scripts. |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 07 Apr 2017 12:19 AM |
| Yeah it's only been a year :) |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 07 Apr 2017 12:40 AM |
| So how exactly do i do this |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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
|
  |
| 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
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
| |
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 07 Apr 2017 12:57 AM |
| .6666 does not round to 10 |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| 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
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 07 Apr 2017 01:01 AM |
| Why not just BodyPosition though |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
| |
|
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
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 07 Apr 2017 01:03 AM |
when given a decimal above >= .5
|
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 07 Apr 2017 01:05 AM |
| Shouldn't jokes be funny :P |
|
|
| Report Abuse |
|
|