@@DominoBuilder-1 Also, one thing I don't think I mentioned in the tutorial is that the door can be pushed by the player when they walk into it, so It'd be a good thing to either anchor/unanchor the door, or use welds in the DragStart and DragEnd events
A can think of a few ways to get it to work. 1. Check it's rotation/position How this could work is by maybe checking the position/rotation changing and then seeing what position it is. Of course for position it might not work as well if your using it as a assest. Here is a basic script format that shows what might work with this one: Part/Group located ↓ (1 of 2 ways might not be a thing) Value change function based of the drag detector - if it's being held down maybe? (2 of 2 this might work instead) Add a click detector and then make a function based on if its being held down by a users mouse ↓ Check position every frame using heartbeat (local RS = game:getservice("runservice") ↓ Then if its at the correct ↓ Make sound/open door/whatever you need it to do ↓ Lock in place maybe? Another way I can think of is by just simply making a function that goes off when the position/rotation gets to a point
i was looking for something like this, thank you for Helping me create something like this. I was looking for Something similar to this because I'm making a game similar to the Amnesia series, and Amnesia uses draggable doors, and now i can finally replace my old janky Doors with my new created doors using your tutorial!
No problem, remember to add a weld constraint which gets disabled whenever the player starts dragging the door, and enabled on the drag end. Otherwise, people will be able to move the door by walking into it
coroutines are simple. they're just threads that you can stop/resume/yield (wait)/etc. local f=coroutine.create(print) coroutine.resume(f) -- runs print coroutine.resume(coroutine.create(function() print'doesnt block execution' end))
Wow nice video!!!! Can you make my dream and can you fulfill my dream and make a door that opens as the player pushes it with his body, sorry if it’s not clear, if anything you can see what I want in the game The Wild West in Bronze City by simply opening any door more slowly. Thank You!
is there a way you can show us how to use the sliding door one on a vehile like a truck. cause it breaks everytime i try or maybe explain how i can get it to work on a vehicle
Hey im wondering how to save an entire game and load it (im kinda new to saves in roblox) because i want to save the players location,inventory, and just like if the players break a window i want the window to be broken when loaded. I hope you can like tell me how i should do it (not really a script, just a concept on how to do it)
Guessing it would be for a single player game, you would have to use DataStores, make one table for the player and one for the environment, it would look like something like this: GlobalData[plr.UserId] = { PlrData = { LastLocation = RegisteredCFrame, Inventory = {inventoryItems}, }, EnvironmentData = { Window1 = false, (false being the isBroken state) Window2 = true, }, } And so on. Then whenever the player would join a server, you would have to go through every corresponsive item on the map and load it's state. Tools like CollectionService help manage stuff like this.
@@ItsBlauze If you mean how to put it in player data, you just assign it as you would assign a normal variable. If you want to load e.g. player's inventory for them, you would have to make a remote event and pass the inventory through that.
Great tutorial, but it seems that because it is unanchored I can just push it open which sort of removes purpose from being able to drag it open. But anchoring it will make the HingeConstraint not work.. is there any sort of fix I can do to prevent this?
Oo right thanks for pointing that out! You can add a weldconstraint to the hinge and set it as part0, then doorpart as part1, and enable/disable the constraint in the DragStart and DragEnd events. Also thinking about it, you can also keep enabling the weld inside DragContinue, in case of multiple people dragging the door at the same time, so it doesn't break.
@@emirkomutan4212that's not really how the servers work, ik you're joking but the servers crash because of too many people not a extremely good game. if that was the case games like that hogwarts recreation, realistic forests, and that angel statue wouldn't exist.
I've never used roblox studio before, but this guy makes me really wanna..
You should try it! you can make tons of cool games
@@Reqeuni love paying a dev team more googolplex dollars than there are atoms in the Universe Per quectosecond per persom.
start.
@confusingsomethingroblox gives free game hosting services
@confusingsomething f**k UnItY
TYSM BRO BEST TUTORIAL!!!
Yw
btw i'm watching it over and over untill I get perfect door
btw thanks i'm making a realistic game with draggable doors and items!
u got that stuff
@@DominoBuilder-1 Also, one thing I don't think I mentioned in the tutorial is that the door can be pushed by the player when they walk into it, so It'd be a good thing to either anchor/unanchor the door, or use welds in the DragStart and DragEnd events
i didnt know roblox had an inbuilt drag system thats cool!
It went live recently and it's a really cool tech too. More people should know about it, and that's why I made few drag detector tutorials already.
was it meant to be implemented on vr games?
@@Salok_z Yes, it works with every platform input
drag dectectors are so fun, been using them since beta
Maybe make some sort of part 2 to this tutorial.
You can use levers and buttons to open any type of doors.
so maybe if there`s no any "at angle" option in script for this i think you can use position and rotation to use it
A can think of a few ways to get it to work.
1. Check it's rotation/position
How this could work is by maybe checking the position/rotation changing and then seeing what position it is.
Of course for position it might not work as well if your using it as a assest.
Here is a basic script format that shows what might work with this one:
Part/Group located
↓
(1 of 2 ways might not be a thing)
Value change function based of the drag detector - if it's being held down maybe?
(2 of 2 this might work instead)
Add a click detector and then make a function based on if its being held down by a users mouse
↓
Check position every frame using heartbeat (local RS = game:getservice("runservice")
↓
Then if its at the correct
↓
Make sound/open door/whatever you need it to do
↓
Lock in place maybe?
Another way I can think of is by just simply making a function that goes off when the position/rotation gets to a point
When I get back to my house then I'll check it out and maybe wip up a small script and give it to you
yo man as a huge dev with scripting i didnt know that
you my guy will blow up one day
i was looking for something like this, thank you for Helping me create something like this. I was looking for Something similar to this because I'm making a game similar to the Amnesia series, and Amnesia uses draggable doors, and now i can finally replace my old janky Doors with my new created doors using your tutorial!
No problem, remember to add a weld constraint which gets disabled whenever the player starts dragging the door, and enabled on the drag end.
Otherwise, people will be able to move the door by walking into it
TYSM BROOO
Dragdetectors my beloved
YOU HERE???
Another great tutorial!
love your tutorials
dude youre a legend
Really good tutorial! How about a tutorial on coroutines next and where you may use it?
Yeah, got coroutines on my to-do, so I'll be making a tutorial on them somewhere in the future
coroutines are simple. they're just threads that you can stop/resume/yield (wait)/etc.
local f=coroutine.create(print) coroutine.resume(f) -- runs print
coroutine.resume(coroutine.create(function() print'doesnt block execution' end))
@@DanniDuck No, I understand that. I just don't understand when and where to use it.
@@Paul1Rbyou have an italian accent
@@CiaosonoMemosoo I guess my accent is a mix of polish/netherlandish/italian/german, according to my viewers.
Uhmm.. Brother I have a problem I can't see the Physics response tab in explorer like I don't know where to find it
Wow nice video!!!! Can you make my dream and can you fulfill my dream and make a door that opens as the player pushes it with his body, sorry if it’s not clear, if anything you can see what I want in the game The Wild West in Bronze City by simply opening any door more slowly. Thank You!
You are definitely italian
Nuh uh
is there a way you can show us how to use the sliding door one on a vehile like a truck. cause it breaks everytime i try or maybe explain how i can get it to work on a vehicle
how would you add sounds to it tho?
You can play a sound In the DragStart or DragContinue event
Hey im wondering how to save an entire game and load it (im kinda new to saves in roblox) because i want to save the players location,inventory, and just like if the players break a window i want the window to be broken when loaded. I hope you can like tell me how i should do it (not really a script, just a concept on how to do it)
Guessing it would be for a single player game, you would have to use DataStores, make one table for the player and one for the environment, it would look like something like this:
GlobalData[plr.UserId] = {
PlrData = {
LastLocation = RegisteredCFrame,
Inventory = {inventoryItems},
},
EnvironmentData = {
Window1 = false, (false being the isBroken state)
Window2 = true,
},
}
And so on.
Then whenever the player would join a server, you would have to go through every corresponsive item on the map and load it's state. Tools like CollectionService help manage stuff like this.
@@Paul1Rb thank you so much
@@Paul1Rb hmm, how do you load a table? Like the playerdata table in the data
@@ItsBlauze If you mean how to put it in player data, you just assign it as you would assign a normal variable. If you want to load e.g. player's inventory for them, you would have to make a remote event and pass the inventory through that.
Can you make them as team doors? Idk how to rlly explain
Hey bro can u do Q&A at 2000 subs?
I want to do it whenever I have a discord server, and I'll be doing Q&A's from time to time throughout my channel
Great tutorial, but it seems that because it is unanchored I can just push it open which sort of removes purpose from being able to drag it open. But anchoring it will make the HingeConstraint not work.. is there any sort of fix I can do to prevent this?
Oo right thanks for pointing that out!
You can add a weldconstraint to the hinge and set it as part0, then doorpart as part1, and enable/disable the constraint in the DragStart and DragEnd events.
Also thinking about it, you can also keep enabling the weld inside DragContinue, in case of multiple people dragging the door at the same time, so it doesn't break.
@@Paul1Rb i dont understand what you said can you explain it to me because im not very experienced in scripting
@@amustingcow I recommend following beginner guides then
@@Paul1Rb wait how to I make the part weightless or make it a certain weight
someone better make teardown in roblox
Hey hey you want to make a new 3 days outage?
@@emirkomutan4212that's not really how the servers work, ik you're joking but the servers crash because of too many people not a extremely good game.
if that was the case games like that hogwarts recreation, realistic forests, and that angel statue wouldn't exist.
Yeah i was joking. @@VilactDoesntSayShitYourselfNow but thx for the info
they dont seem to work for me /:
what if the door is heavy, you need to drag it more.
on the massless property
polish?
does this work for mobile at all?
Yes, works for all platforms
For me the door part is just falling apart
It needs to be welded
Are you hireable? I'd be willing to pay a couple thousand in order to commission you.
Got comms closed for now, sorry.
*drags door*
undrags your door
@@Paul1Rb *redrags door*
@@goofuston nuh uh
@@Paul1Rb *yuh uh*
battle of the century