generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Help. {Please}

Previous Thread :: Next Thread 
kools is not online. kools
Joined: 11 Jan 2009
Total Posts: 1659
31 Mar 2012 07:37 AM
So this script basicly takes a value that is supposed to be in the player but for some reason when I test on 'Play' (Becuase the IntValues aren't inserted when I test 'Play Solo') it doesn't work. Here's the script:

--[[And yeah the way the gui is set up goes like this. Player>PlayerGui>ScreenGui>TextLabel>Script
]]

while true do
local Player = script.Parent.Parent.Parent.Parent
local PlayerStat = Player["$s"]
script.Parent.Text = " x"..PlayerStat.Value.."."
end

--Yep.
Report Abuse
kools is not online. kools
Joined: 11 Jan 2009
Total Posts: 1659
31 Mar 2012 07:53 AM
I think if I made my title have more " ! " 's I would have a reply right about now. :( Please answer, Oh and Bump!
Report Abuse
Maelstronomer is not online. Maelstronomer
Joined: 07 Jun 2008
Total Posts: 7649
31 Mar 2012 07:54 AM
while true do


ಠ_ಠ
Report Abuse
DangCool is not online. DangCool
Joined: 27 Apr 2010
Total Posts: 5568
31 Mar 2012 07:55 AM
[ Content Deleted ]
Report Abuse
kools is not online. kools
Joined: 11 Jan 2009
Total Posts: 1659
31 Mar 2012 07:59 AM
Oh. Yeh. Should have saw that. *FacePalm* Thank you.
Report Abuse
fireblade2 is not online. fireblade2
Joined: 18 Nov 2007
Total Posts: 4666
31 Mar 2012 08:04 AM
I remember from past experiences that 'while true do' usually needs a 'wait()' function somewhere inside of it, or it instead needs to be 'while wait(time) do'.

I also know that your script will not work if it cannot find the value inside of the player. Usually you have to wait some time before you can access values inside of a player, especially if they have been inserted by a script. My suggestion would to insert a loop to wait until the value inside the player is found.

If I do not misunderstand your purpose, the final script would be:


Player = script.Parent.Parent.Parent.Parent

repeat
wait()
until Player:findFirstChild("$s")

while wait() do
local Player = script.Parent.Parent.Parent.Parent
local PlayerStat = Player["$s"]
script.Parent.Text = " x"..PlayerStat.Value.."."
end



Correct me if I am wrong.

Report Abuse
Contemptus is not online. Contemptus
Joined: 27 Mar 2012
Total Posts: 368
31 Mar 2012 08:43 AM
@ fireblade, not usually, always.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image