![]() ![]() You can rename or adjust that any way you see fit, or store the player object in any manner you wish. ' Data' is just a folder I put in the Workspace and ' Player' (Capital P) is an ObjectValue container I named ' Player' which I use to store the player object. In my case, only one player is on the server, but you can adapt the code to track other players as you see fit. This script fires when a player joins the game. The game I'm working on is a single player game, so I store the player object in an object container which I access whenever I need the value in any of my server side scripts.įor example: :Connect(function(player) ![]() This can be done be capturing the player object when they first load onto the server using a regular script somewhere in the Workspace. ( player.Character).īefore you can access the Character property, you need to get the player's object. To get a player's position (server side) you need to access the player's character property. ![]() Roblox is very confusing, despite their claims that it is an easy way to learn scripting. The error message I get falls along the lines of Player is not a valid member of Players.I feel your pain. When I try to set the text to these values, nothing happens. I've looked in every script that comes with it, but could not find anything. I've also tried to locate the original variable, but because I did not make the kit I'm at a loss. ![]() It only works when I replace "Player" with my username ( .Cash.Value), but I want this to work for other players besides me. I've tried replacing it with LocalPlayer (looked like .Cash.Value), but that also didn't work. I've tried to grab the variable (named "Cash") like this: .Cash.Value but because I'm not named "Player", it didn't work. Players (on the first tab of the workspace)-> Player-> leaderstats-> Cash I do not know how to upload am image, but the path in my workspace looks a bit like this: Now, setting up the GUI isn't the issue, knowing what to set the text value on the GUI is. This can make it hard to know how much money you have on console and mobile, so I'm trying to set up a GUI to display the player's amount of money on the screen. I'm currently using a tycoon kit to create a Roblox game, and the player's money value only shows up on the leaderboard, but nowhere on the screen. I'm new to Lua and Stack so I apologize in advance. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |