Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to Keybind and change a character's size server-wise?

Asked by 5 years ago

So while programming, I tried using CAS in a local script to register the detection of "F" (which worked great) to shrink the player to a smaller size (which didn't work as great).

I had everything working, the player shrinks as "F" is held. When the player presses "F" again, it grows back to normal size.

The issue came about when I asked my friend to test it with me. He agreed. I uploaded my file and got in the game. I wanted to make sure he could see my character shrink. I used the ability, became 0.2 in size on every scale in Humanoid, but although it showed that I was small on my screen, on his, my character was simply going through the floor.

I'm not sure if any character manipulation through LocalPlayer or by a Local Script doesn't show for anyone else and I have to use a regular script if I want the character manipulation to be seen by everyone in the server.

I made another test. I used a regular script to shrink a character's head as soon as they joined using PlayerAdded and CharacterAdded in a Script. When my friend and I got on the game, it worked fine and we had a good laugh at having really small heads.

This gave me the bright idea to put the character manipulation in a regular script located in serverstorage and clone it to the player when used, destroying it when not used. This would be done and controlled by a LocalScript for the keybind, in which I don't know how to get a keybind through a regular script, although I think that would register for all player's in the game anyway so it wouldn't be good. Now, little did I know that Local Scripts didn't have access to serverstorage, but I found out a little bit ago after preparing it. The frustration of that really sucked.

Does anyone know how this situation can be handled?

0
Network model, client-server BenSBk 781 — 5y

Answer this question