What do you want to achieve? An elevator that has no buttons and automatically goes between floor two and floors one
What is the issue? The function will not work and the elevator will not go to floor 2
What solutions have you tried so far? I couldn’t find anything relating to a problem like this
I am very new to scripting and don’t know a lot, I took some assets from a normal elevator script that has up and down buttons and put in what I thought would work. So sorry if this is an easy solution and i’m dumb lol thanks
I tried to run the script but it gives me an error saying
19:40:06.493 Workspace.Model.Part.Script:10: attempt to index function with ‘Play’
Also your English is pretty good
That is because when you joined, the script was already running for some time, so the 5 seconds was from when the server started, not from when you (player) joined. You can wait until the player joined, then waiting for 5 more seconds.
game:GetService("Players").PlayerAdded:Wait()
wait(5)
-- rest of code
I do not understand what you are trying to say. Best form to use tweens? What’s that?
Anyways this code you provided does not work at all because you overwrote the variable gotolevel1 and gotolevel2, which is both the tweens. If you try running this code out it will probably result in a “Attempt to index nil” error because there is not .Play property on a function.