The output says" Workspace.Door.Script2:3: attempt to call method 'Touched' (a userdata value)" I don't know what I'm doing wrong
door = game.Workspace.Door if game.Workspace.Door.Touched() then door.CanCollide = false for i = 0.5, 1, 0.1 do door.Transparency = i wait () end for i = 1, 0.5, -.1 do door.Transparency = i wait () end door.CanCollide = true end
The Touched event can be called on with a function not an if statement. Use this instead:
door = game.Workspace.Door door.Touched:connect(function() door.CanCollide = false for i = 0.5, 1, 0.1 do door.Transparency = i wait () end for i = 1, 0.5, -.1 do door.Transparency = i wait () end door.CanCollide = true end)