Hi there, I am currently struggling with a really simple door system tweening the door objects (which won’t work!)
I don’t know why it would not work, because it prints the stuff which I put right above the tween line into the output, yet the doors won’t move. There is a BindableEvent getting fired when the train comes to a stop automatically. My goal is to tween the position to another part giving the position of where the door should be when open, and either way. The door is a simple union.
No errors were printed
Code :
function open()
print ("Open Door")
local tween = TweenService:Create(script.Parent.Door, info,{Position = script.Parent.DoorOpen.Position})
tween:Play()
end
function close()
print ("Close Door")
local tween = TweenService:Create(script.Parent.Door, info,{Position = script.Parent.DoorClosed.Position})
tween:Play()
end
Drive.FireDoors.Event:Connect(function(cmd)
if cmd == ("Open") then
open()
elseif cmd == ("Close") then
close()
end
end)
Did you test it in studio? If so try and test it in the server itself.
because I got errors usually when playing in the server rather than in the studio