Im trying to make a button that is on the players screen that when clicked toggles the gravity of that person so they float due to the gravity being lower for them, the problem I am having is that I made everything work the only thing is the button affects the gravity of the whole server and not just the one player and it might be a super simple solution but im new to this and cant find much online so I came here to ask.
#Gravity Button
1 messages · Page 1 of 1 (latest)
I'm dog shit at scripting but if you send a screenshot of the code maybe I can help
I actually had the assistant thing draft up the base code and it did what i wanted except it just modified the jump power/height so i changed it to affect the gravity and i knew it was gonna just change the gravity of the whole game but I was just testing and hoping maybe i could figure out how to do it but like I said I just started learning or understanding some things so I was just messing around trying to figure it out and obviously it didnt work. I thought that maybe id need the script on the button you press which is just a Gui button on the screen becuase right now this is put in ServerScriptServices and calls to a remote event and it all works but like I said it changes the gravity for the whole workspace. I dont know if I need to make another script that creates a gravity variable for each player that joins or something like that and then adjust that value so its player specific or what.
^
Yh it may have to be separate variable since workspace is gonna target everything its parent to
Hold on let me open studio quick
Try putting a new script with the same idea in starter player scripts and make it local from there
do you mean like copying this code over to a new script thats under StartPlayerScripts and then seeing if that works or just the same kind of logic with the variables and whatnot thats under a script in that new place
same kind of logic with the variables
transfer script to a local script in starterplayer
So i transferred over the script to a local script in starterplayer and then nothing happened when I tried it in game, it only seems to work if its coming from a script in the serverscriptservice since it ends up changing the gravity of the whole server and maybe I just dont understand which is very likely but is there even a way to adjust the gravity for only one person depending on if they click the button or not since its a setting in the workspace and not a setting on like a characters individual avatar?
** You are now Level 1! **