Stopping DragDetector from stopping movement of a model it is attached to

  1. What do you want to achieve? I would like to allow a model with a level thingy with DragDetector move freely while the DragDetector is dragged. The hinge connecting the model and lever is used to get speed i need for the train thingy.

  2. What is the issue? When the DragDetector is dragged, the physical movement is stopped.


    I want to avoid this, and make it so that the model still moves when the DragDetector is dragged.

  3. What solutions have you tried so far? I tried doing something client-sided, but it doesn’t quite log the CurrentAngle of a hinge.

There’s my code for the movement:

local RS = game:GetService("RunService")
local TS = game:GetService("TweenService")
local TI = TweenInfo.new(15, Enum.EasingStyle.Quad)
local lever = script.Parent.Lever.HingeConstraint
local speed = script.Parent.Carriage.LinearVelocity

RS.Stepped:Connect(function()
	local goal
	if math.abs(lever.CurrentAngle) > 3 then
		goal = {LineVelocity = 120*math.abs(lever.CurrentAngle)/100}
	else
		goal = {LineVelocity =  0}
	end
	local T = TS:Create(speed, TI, goal)
	T:Play()
end)
3 Likes

well it is indeed a dragdetector, so it’s going to act as if you’re holding that thing in place. you’d better off scripting your own system for this, I do not thnk drafgdetectors have the intented behavior you need or wnat.

Thanks. It will be very hard from now on then. :frowning:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.