LoadString (Method): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>Itunes89 No edit summary |
>NecroBumpist |
||
Line 9: | Line 9: | ||
{{clear floats}} | {{clear floats}} | ||
<br /> | <br /> | ||
==Example== | |||
This code will load the string saved under the key "hi". | |||
<code lua> | |||
game.Players.PlayerAdded:connect(function(player) --Connection line. Fires when a player leaves the game. | |||
player:WaitForDataReady() --Waiting for the player's data to be ready. | |||
print(player:LoadString("hi")) --Prints to the output whatever value is saved to the key "hi" in that player. | |||
end | |||
end) | |||
</code> | |||
MY DICK! | MY DICK! |
Revision as of 02:47, 17 April 2012
Example
This code will load the string saved under the key "hi".
game.Players.PlayerAdded:connect(function(player) --Connection line. Fires when a player leaves the game.
player:WaitForDataReady() --Waiting for the player's data to be ready.
print(player:LoadString("hi")) --Prints to the output whatever value is saved to the key "hi" in that player.
end
end)
MY DICK!