-
What do you want to achieve?
Hello, i want to Tween on the client-side because on the server the tween is not smooth.
I already tweened on the client-side it fixed the issue it was smooth and clean but when a player joined he didn’t see the tween if the player join while the tween is playing on the client. (This was with a module) -
What is the issue?
I don’t know how to tween on the client-side with an system that when a player join he see the tween even if he was not here while it was launched. -
What solutions have you tried so far?
It has been months now that im searching a solution to that on forums, on youtube and nothing.
Add your gui tween scripts (if its a gui) or your tween in replicatedfirst! Replicatedfirst what you add in there is your first scripts that will run! It only takes local scripts not server scripts!
Handle all main / door / whatever logic on the server, player triggered proximity prompt? Get that information on the server & then fire to all clients & do your tween on the client.
On the server, you can have a method of identifying whether or not a door is open by putting a boolean value inside it. Everytime the door opens, set the value to true & fire all clients telling them to run the tween.
When a player joins, simply iterate through all doors & read the values, if the value is true, open that door.
I don’t use proximity prompt on my sliding doors
It’s just a concept, when you want to open something, mark it open on the server.
But it dosen’t fix the issue that the other player that is joining won’t see the tween, it’s not gonna be the same position for the client that is joining
Because in my game i have something that take a long time to move and it has to be the exact position for all clients
So directly set the position rather than tween it?
But if it’s the position it will not be tweened
You only set the position for players that join the game.
But it will not move it will be freeze in the middle of the tween
Look, imagine this.
You click a button to open a door, all clients in game have the tween played for that door and it’s open for everyone. You have a bool value inside the door so you set it to true.
New player joins the game, none of the doors are open for him, so on his client we iterate all doors and find out which ones have the bool value set to true inside of them, then (instead of tweening) we just directly set their position or CFrame or whatever we want to change.
If you want to tween on the client-side then you just need to create and play those tweens locally (from within local scripts).
You use a remote event, you say click a button on the client it fires the remote to the server then with that same remote you fire back to everyones client with “Remote:FireAllClients(parameters)” and then on the client you pick that even up to do effects and everyone can see it. Mark a solution if anyone here helped.
You didn’t read his question, he wants everyone to see the tweening of the object. Meaning he has to fire from client-server-client if he wants to tween clientside while still visible for everyone. This is how many games do all their effects!
Or he could just tween on the server.
Tweening on the server is not smooth.
Tweening on the server is bad, the servers physics run at 30 fps flat or something compared to 60 double that on the client meaning you can visibly see 2x more stutter on the client when tweening. Tweening is moving a part in iterations I believe meaning you can literally see that happening each time it goes from one point to the next in the tween when tweened on the server so it’s really bad unless you want low quality effects.