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 » Scripters
Home Search
 

Re: Why won't this work??

Previous Thread :: Next Thread 
robloxer8282 is not online. robloxer8282
Joined: 25 Dec 2012
Total Posts: 819
16 Aug 2015 06:03 PM
timer = game.StarterGui.timer.Frame.TextLabel
plr = game.Players.LocalPlayer
if timer.Text == "10" then
print('timer finished.. starting game')
game.ServerStorage.tool:clone().Parent = plr.Backpack
end

I don't see any errors in the output
I've been trying to fix the problem for two days
Report Abuse
robloxer8282 is not online. robloxer8282
Joined: 25 Dec 2012
Total Posts: 819
16 Aug 2015 06:07 PM
bump
Report Abuse
ScrewDeath is not online. ScrewDeath
Joined: 03 Jun 2012
Total Posts: 2700
16 Aug 2015 06:08 PM
First I needa know a few stuff:
- What are you trying to do?
- In what way does it not work?

But if I had to guess, it's because you don't have anything repeatedly calling that code. Prolly need an event or a loop or something.
Report Abuse
robloxer8282 is not online. robloxer8282
Joined: 25 Dec 2012
Total Posts: 819
16 Aug 2015 06:12 PM
Adding a loop didn't fix it
when the timer reaches 10
it puts a tool in your inventory
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
16 Aug 2015 06:15 PM
you need to edit the playergui not startergui.


"Talk is cheap. Show me the code." - Linus Torvalds
Report Abuse
robloxer8282 is not online. robloxer8282
Joined: 25 Dec 2012
Total Posts: 819
16 Aug 2015 06:15 PM
wawda
Report Abuse
ScrewDeath is not online. ScrewDeath
Joined: 03 Jun 2012
Total Posts: 2700
16 Aug 2015 06:16 PM
If the provided code is really all the relevant code you have than the problem IS that you're only running it once.

What you just did is basically if I'm picking up cookies one by one.
You ask me if I have 10 cookies
I'm like rofl no
I'd eventually get 10 cookies and maybe more but you didn't ask me again so you wouldn't know that I did.
Report Abuse
robloxer8282 is not online. robloxer8282
Joined: 25 Dec 2012
Total Posts: 819
16 Aug 2015 06:18 PM
@TimeTicks, still won't work..
Report Abuse
robloxer8282 is not online. robloxer8282
Joined: 25 Dec 2012
Total Posts: 819
16 Aug 2015 06:19 PM
I added a while true do loop
and a wait at the before end
didnt work
Report Abuse
ScrewDeath is not online. ScrewDeath
Joined: 03 Jun 2012
Total Posts: 2700
16 Aug 2015 06:21 PM
What does your script look like now?
Were there any errors?
Report Abuse
robloxer8282 is not online. robloxer8282
Joined: 25 Dec 2012
Total Posts: 819
16 Aug 2015 06:25 PM
@ScrewDeath no

I tried RemoteEvents
but this wont work..
x = 0
while true do
x = x + 1
script.Parent.TextLabel.Text = x
if x == 10 then
warn('timer: 10')
game.Workspace.StartGame:FireClient()
break
else
warn("timer: "..x)
end
wait(0.5)
end
I get an error saying that the argument on line 8 is missing or nil
Report Abuse
robloxer8282 is not online. robloxer8282
Joined: 25 Dec 2012
Total Posts: 819
16 Aug 2015 06:26 PM
it looked like this..

plr = game.Players.LocalPlayer
timer = plr.PlayerGui.timer.Frame.TextLabel


while true do
if timer.Text == "10" then
print('timer finished.. starting game')
game.ServerStorage.Flashlight:clone().Parent = plr.Backpack
end
wait()
end
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
16 Aug 2015 06:26 PM
script.Parent.TextLabel.Changed:connect(function()
if script.Parent.TextLabel.Text == "10" then
--stuff
end
end)


"Talk is cheap. Show me the code." - Linus Torvalds
Report Abuse
robloxer8282 is not online. robloxer8282
Joined: 25 Dec 2012
Total Posts: 819
16 Aug 2015 06:29 PM
@TimeTicks still wont work..
maybe its not how I check it..
Report Abuse
robloxer8282 is not online. robloxer8282
Joined: 25 Dec 2012
Total Posts: 819
16 Aug 2015 06:34 PM
plr = game.Players.LocalPlayer
timer = plr.PlayerGui.timer.Frame.TextLabel



timer.Changed:connect(function()
print('okay')
if timer.Text == "10" then
print('timer finished.. starting game')
game.ServerStorage.Flashlight:clone().Parent = plr.Backpack
end
end)


It's not printing 'okay'
which means the timer.Changed won't work
Report Abuse
robloxer8282 is not online. robloxer8282
Joined: 25 Dec 2012
Total Posts: 819
16 Aug 2015 06:51 PM
bump
Report Abuse
EmsyThorne is not online. EmsyThorne
Joined: 07 May 2015
Total Posts: 183
16 Aug 2015 07:09 PM
A) Is the code in a LocalScript?
B) Is the LocalScript in a place inside the Player?
Report Abuse
robloxer8282 is not online. robloxer8282
Joined: 25 Dec 2012
Total Posts: 819
16 Aug 2015 08:18 PM
@EmsyThorne, A is yes because I'm not stupid.. and B is a no
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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