The script below destroys the other script which is just a tween move script but after it destroys the script, the script that has been destroyed still runs. That means its gone from the workspace but it still has the effects. Why is that and how can i fix it? Also i am new to scripting so please don't criticize me, thnx
local CurrentPos = workspace.touchablepart.Position
if workspace.touchablepart.ClickDetector.MouseClick then
workspace.MoveScript:Destroy()
elseif workspace.touchablepart.ClickDetector.MouseHoverEnter then
wait (.5)
workspace.touchablepart.Position = CurrentPos + Vector3.new(2,0,0)
end

5 comments
Have you tried disabling the script
tbh idek if that works but you can try
ok i'll try
wait what do u mean?? How can i do that
script.DIsabled = true