#script in studio vs script in game
1 messages · Page 1 of 1 (latest)
Did you check the server one too? by clicking on the server tab of that in-game console
Okay so if the game isn't loaded, it'll wait for it to be loaded, but nothing will happen after that.
If the first condition is met, it'll run game.Loaded:Wait() and do nothing else.
Only if the game is loaded at the moment the if is reached will the UIS connection happen
Just move the UIS connection out of the if statement entirely
What's with the two while loops
it crashes my studio if its not there
** You are now Level 3! **
but why do you have two of them
to fit an extra task.wait()
im not exactly sure why but if i dont have that extra tast.wait() itll crash my studio
So you make an entire extra while loop just to fit in an extra task.wait? instead of just... calling task.wait twice?
thats honestly never occurred to me
okay it doesnt crash my studio anymore but it still doesnt work in game
add some prints to see what is and isn't running
it prints everything just fine the way i want it to in studio but nothing happens in game
So the logic issue is that, if the while loop is running, you're holding right.
So that means it'll never be "Q", as the only time it can reach the if statement is if the mouse button is pressed
alright, fixed 👍🏿
another issue has come up from this that i just noticed and its that for some reason its not consistent, sometimes i can join the game and itll work, but most times i have to reset first before itll work, and i have no idea why
it's because you're doing CharacterAdded:Wait(). If the character is loaded before that, it'll wait until the next time the event happens, which is when you reset.
So you need to do player.Character or player.CharacterAdded:Wait(), which means if the character is nil, wait for the character to be added. If it's not nil, then use it
i dont know if you meant like this but this still doesnt work
Almost, wrong way around though
still doesnt work
You didn't change line 2. that's the one that's the wrong way around