Yeah I was just wondering why you would mention both models in each one, sorry about the confusion
Not very important to use shift. other keys would work.
I shall have a go at upping the plane offset to 15. thank you.
How can I set the maxactivation distance from the dragdettector that it only 32 is for the team the player is in
So a player in your team place the model with the dragdettector it set for that team it on 32 and the other teams 0
I will use it for my game I has made for a game jam but now we will complete that Game
I will made a party system using teams with space for 4 partys do if all parties are used server be Descending and only friends can join and come in the party from the inviter then you can attack others but so I made a block with a dragdettector what only can be used for that team and you be atacked by creatures
If you are trying to make a DragDetector that only certain players can use, there is anoher way to do this than giving them different activation distances. You can add a constraint function that only moves when certain players click it.
Here is a link to a video that shows you how to do this, and the script required is in the description.
You can modify the script to compare the âdraggingPlayerâ to any of the allowed players in your group.
(Note that we also hope to add an easier way to do this in the coming months with new API:
a property named PermissionPolicy with 3 values: Nobody, Everybody, or Scripted. If scripted, you may register a method dragDetector:SetScriptedPermissionCheck(function(player, part) that returns true if the player may drag the part, false otherwise.)
DragDetectors are officially released, and out of beta!
Thank you all so much for your feedback and questions during our beta period. Youâve made a huge difference.
We will continue to watch this post for questions. But please join us over at the new announcement post, and bring your experience there to help the new creators as they join us in building new kinds of interactive games in Roblox!
https://devforum.roblox.com/t/announcing-dragdetectors/2641956
Good idea! Imma make a game of that!
@xxoof_oofoofxxALT please share a link when you have something!
We are all eager to see what you do with this in real game settings!
Thatâs not really Iâm searching for I mean if a player in a team place a model with dragdettectors only that team can use that
And in my story the dragdettector cannot drag screws out the wall
The fan clitch out the wall because the union collision thing is not set to box but I still cannot drag the screws
Quick question, Mouse.Button1Down doesnât fire when clicking on a part with a DragDetector parented under it. Is this intended behaviour? If so, what alternatives can I use?
@MintSoapBar Iâve never used that API. I suspect that the DragDetector may be swallowing the event before your mouse gets a chance to process it.
As an alternative, you can put your code in a response to dragStart:
dragDetector.DragStart:Connect(function(...)
-- do what you wanted to do on Mouse.Button1Down here.
end)
You can actually make some cool variations on buttons using DragDetectors that you were never able to do with clickDetectors, because you can detect both the down and the up on dragStart and dragEnd.
If you set the ResponseStyle to custom, and then donât do anything, then the part wonât move but you can still detect down and up.
There are 3 button examples in DragDetectors TestWorld 2
A push button, a sprarying button , and a toggle button:
Is there a simple alterative that you know of? Right now, the only alternate option I know to detect mouse clicks is ContextActionService (as UserInputService just returns an input object with a KeyCode.Unknown), but that overwrites the DragDetector. I want to be completely sure that there is no other alternative to just connecting my function to listen to every single DragDetectorâs DragStart event in my game since that doesnât seem to be too performance friendly when there can be hundreds of DragDetectors present at the same time.
@razorter by the way @DeFactoCepti has check in a fix for this enabled issue. It should go live in about 2 weeks. âenabledâ will be checked when the drag is attempted, not just when the client sends the signal; so your timing issue should go away.
If ContextActionService is getting you the information you need, then I think you are in luck.
If you are using BindAction, then your action handler can return the value
Enum.ContextActionResult.Pass.
This will make it so that your handler doesnât âclaimâ the event for its own use, and the events should continue on to the DragDetector.
By default, if you donât return a value, then it assumes you want ContextActionResult.Sink which prevents others from using it after you
Iâm trying this out, the part wonât even accept that Iâm clicking on it. Either my place is cursed with the fact I canât use drag detectors or itâs just very buggy.
@PolyHall Itâs unlikely that DragDetectors are very buggy because weâve got many successful creators and players happily using them.
Youâve probably got a plugin installed thatâs stealing your events.
Start simple. Just add a part with a dragdetector below it and click play. If this doesnât work in studio, but it works when you publish your game, itâs almost certainly a plugin. Disable them all and see if things improve.
If you still have an issue, check if there is anything in your output window when you hit play and report back.
And if the simple demo works, but not your game, then your game may not be cursed, but you may be binding actions with ContextActionService that are stealing the mouse events. Try returning Enum.ContextActionResult.Pass from any actions bound to the mouse and see whether that lets them fall through to the DragDetectors.
Please let us know how it goes.
@PrinceTybalt Why is this happening to me? Is there anyway to make it smoother? https://youtu.be/XNfZh0SwwlI Edit: How do i make this so it doesnt go very far I want it to stay in front of the player.
@xxoof_oofoofxxALT I assume its the jumpy-jittery up-and-downiness that bothers you? Itâs hard to tell without seeing the contents of the scene. It might be colliding against the wall or something in an odd way? Or it might be this issue. If you share an rbx file that shows the effect, I will take a look.
As for âHow do i make this so it doesnt go very far I want it to stay in front of the player.â
there are two things to consider:
First, hereâs a reply to the main announcement that talks about ways to limit how far you object will go when you drag it in a plane.
Secondly, check out and/or download the Lift and Carry sample world or the Lift and Carry - Physical or Lift and Carry - Geometric models that are described in the main announcement. They move approximately in the style of the Lumber Tycoon dragger.
Dang, didnât think any of my old code was still usable. Nice.
I originally planned on rewriting everything in TS and putting it on GitHub since itâs a much better workflow, but never got around to doing it. So best option is just my Roblox inventory.
Be wary though, I never intended it to be used in anything too serious. Itâs far from optimized (e.g. the neighbor search algorithm is O(n²)
for any given BoidGroup. So use multiple groups whereever possible). Will be the first thing I look into if people actually use it in any serious projects.
Glad you like it though, theyâre fun to play around with
Itâs great to hear from you. Iâve just used your boids code to play around a little, and yes if you make big groups it does get slow. But itâs so much fun.
I wrote some boids/particle code back in the day when I was working on Shout3D (a java game engine that nobody knows about anymore; we wrote it so that we could deliver 3D graphics without a plugin back when every browser ran java), It was just as inefficient as yours!
Iâve noticed that DragDetectors donât work if the part is a child of the current active character. Any chance of a fix? Due to quirks with the engine it saves a lot of time if I can do that.