![]() The code will parent the player.Character to nil so the player will never respawn on the client. ![]() ![]() Second, what is player ~= Players.LocalPlayer? Players.LocalPlayer is the client that ran the script, which is yourself, so the above statement will check if the player value is not same ( ~=) with the player that ran the script, if it’s really yourself, don’t invisible it and vice-versa. But why would you add a if statement to check that? Sometimes, if the player’s character is in the void, you will get no returns since how are you supposed to get a destroyed object without magic? So that’s why we use if statements to check does it exist or not. Let’s break down them into two part of logics: player.Character and player ~= Players.LocalPlayer.įirst, what is player.Character? You could imagine a dot stands for 's, which player.Character could mean player’s Character. What is player.Character and player ~= Players.LocalPlayer, exactly? V.Transparency = 0 - They are no longer invisibile V.Transparency = 1 - Makes them invisibleįor i,v in pairs(Character:GetChildren()) do Local Character = īutton.MouseButton1Click:Connect(function() - Connects a function when the button is clickedįor i,v in pairs(Character:GetChildren()) do - Gathers all the parts of the character that is a basepart Local Button = GUI:WaitForChild("TextButton") Note that this is only an example, you may have to change the variables a bit to fit your gui. This would go inside of the UI you are wanting them to be able to click, or in a local script inside of StarterPlayerScripts or StarterCharacterScripts based on your game. ![]() Simply gather all the parts of the local player’s character, and make their transparency go to 1 for full invisibility. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |