Script Assistant gave me DragStarted and DragEnded which aren't members of DragDetector

I asked the Assistant to write me a script to play a sound when using a DragDetector.

For the functions at the end of the script it displayed these lines of code:

-- Connect the DragDetector's DragStarted and DragEnded events to the respective functions
dragDetector.DragStarted:Connect(onDragStart)
dragDetector.DragEnded:Connect(onDragEnd)

dragDetector is the variable name of the DragDetector in my model.
I got an error saying DragStarted is not a valid member of DragDetector in the Output window.

I checked the Documentation on DragDetectors and found that these should be dragDetector.Start and dragDetector.End instead.
I changed these lines and the script runs correctly.

Please update the Assistant to use the correct Event terminology.

3 Likes

Thanks for the report! We’ll follow up when we have an update for you.

2 Likes