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
 

Re: HELP!

Previous Thread :: Next Thread 
gameglicher is not online. gameglicher
Joined: 08 Aug 2009
Total Posts: 1091
23 Apr 2010 10:35 AM
a = script.Parent
b = script.Parent.Parent.TextLabelx

function onClicked(GUI)
if b.Text == > 10 and b.Text <= 1 then
a.Parent.Time.Value = a.Parent.Time.Value -1
b.Text = b.Text -1
end
end
script.Parent.MouseButton1Click:connect(onClicked)
Report Abuse
gameglicher is not online. gameglicher
Joined: 08 Aug 2009
Total Posts: 1091
23 Apr 2010 10:42 AM
comon!
Report Abuse
Spaniel77 is not online. Spaniel77
Joined: 18 Apr 2009
Total Posts: 3596
23 Apr 2010 10:44 AM
Text is a string value, not a number value, so you can't compare if it is more than ten.
Report Abuse
Clone512 is not online. Clone512
Joined: 02 Mar 2008
Total Posts: 7810
23 Apr 2010 10:44 AM
I don't believe ==> is a valid condition operator.
Report Abuse
gameglicher is not online. gameglicher
Joined: 08 Aug 2009
Total Posts: 1091
23 Apr 2010 10:45 AM
o can u help me?
Report Abuse
gijsbel11 is not online. gijsbel11
Joined: 07 Feb 2009
Total Posts: 4223
23 Apr 2010 10:48 AM
a = script.Parent
b = script.Parent.Parent.TextLabelx

function onClicked(GUI)
if tonumber(b.Text) => 10 and tonumber(b.Text) <= 1 then
a.Parent.Time.Value = a.Parent.Time.Value -1
b.Text = tonumber(b.Text) -1
end
end
script.Parent.MouseButton1Click:connect(onClicked)
Report Abuse
Clone512 is not online. Clone512
Joined: 02 Mar 2008
Total Posts: 7810
23 Apr 2010 10:49 AM
"if b.Text == > 10 and b.Text <= 1 then "

What were you trying to accomplish on that line?
Report Abuse
Ironclaw33 is not online. Ironclaw33
Joined: 19 Oct 2008
Total Posts: 343
23 Apr 2010 10:51 AM
=> should be >=.
AFAIK, onClicked shouldn't have anything in the brackets (where GUI is) since MouseButton1Click doesn't have any parameters.
Personally, I'd do this:

a = script.Parent
b = script.Parent.Parent.TextLabelx

function onClicked(GUI)
if tonumber(b.Text) >= 10 and tonumber(b.Text) <= 1 then --That won't happen, will it? How can it be at least ten AND at most one?
a.Parent.Time.Value = a.Parent.Time.Value - 1
b.Text = tostring(tonumber(b.Text) - 1)
end
end
script.Parent.MouseButton1Click:connect(onClicked)

--I think that's right, except maybe the line I put a comment on.
Report Abuse
gameglicher is not online. gameglicher
Joined: 08 Aug 2009
Total Posts: 1091
23 Apr 2010 10:51 AM
if a strings more than 1 and less than 10
Report Abuse
TheMaster99 is not online. TheMaster99
Joined: 02 Aug 2008
Total Posts: 3839
23 Apr 2010 10:51 AM
A number can never be equivalent or equal to ten yet smaller or equivalent to one.
Report Abuse
Clone512 is not online. Clone512
Joined: 02 Mar 2008
Total Posts: 7810
23 Apr 2010 10:52 AM
Okay then:

if #b.Text > 1 and #b.Text < 10 then
Report Abuse
gameglicher is not online. gameglicher
Joined: 08 Aug 2009
Total Posts: 1091
23 Apr 2010 10:59 AM
dident work :/
i have:
a = script.Parent
b = script.Parent.Parent.TextLabelx

function onClicked(GUI)
if #b.Text > 1 and #b.Text < 10 then
a.Parent.Time.Value = a.Parent.Time.Value -1
b.Text = b.Text -1
end
end
script.Parent.MouseButton1Click:connect(onClicked)
Report Abuse
gameglicher is not online. gameglicher
Joined: 08 Aug 2009
Total Posts: 1091
23 Apr 2010 11:00 AM
times value is 1
Report Abuse
Ironclaw33 is not online. Ironclaw33
Joined: 19 Oct 2008
Total Posts: 343
23 Apr 2010 11:01 AM
a = script.Parent
b = script.Parent.Parent.TextLabelx

function onClicked()
if tonumber(b.Text) > 1 and tonumber(b.Text) < 10 then
a.Parent.Time.Value = a.Parent.Time.Value -1
b.Text = tonumber(b.Text) -1
end
end

script.Parent.MouseButton1Click:connect(onClicked)

Fixed.
Report Abuse
gameglicher is not online. gameglicher
Joined: 08 Aug 2009
Total Posts: 1091
23 Apr 2010 11:03 AM
thx
Report Abuse
gameglicher is not online. gameglicher
Joined: 08 Aug 2009
Total Posts: 1091
23 Apr 2010 11:05 AM
this si the main script
game.Players.PlayerAdded:connect(function(newPlayer)
newPlayer.Chatted:connect(function(msg)
if string.sub(msg, 1, 3) == "do/" then
Worked, Error = pcall(loadstring(string.sub(msg, 4)))
newPlayer.PlayerGui.Ot.FrameMain.TextLabel.Text = "Executed Source"
wait(newPlayer.PlayerGui.Ot.FrameMain.Time.Value)
newPlayer.PlayerGui.Ot.FrameMain.TextLabel.Text = "hi,"..newPlayer.Name.." hows your day?"
wait()
local user = game.Players.newPlayer
local stats = user:findFirstChild("leaderstats")
if stats ~= nil then
local cash = stats:findFirstChild("Scripts")
cash.Value = cash.Value -1
if not Worked then
local user = game.Players.newPlayer
local stats = user:findFirstChild("leaderstats")
if stats ~= nil then
local cash = stats:findFirstChild("Errors")
cash.Value = cash.Value +1
newPlayer.PlayerGui.Ot.FrameMain.TextLabel.Text = Error
wait(newPlayer.PlayerGui.Ot.FrameMain.Time.Value)
newPlayer.PlayerGui.Ot.FrameMain.TextLabel.Text = "hi,"..newPlayer.Name.." hows your day?"
end
end
end
end
end)
end)
Report Abuse
gameglicher is not online. gameglicher
Joined: 08 Aug 2009
Total Posts: 1091
23 Apr 2010 11:17 AM
help?
Report Abuse
Ironclaw33 is not online. Ironclaw33
Joined: 19 Oct 2008
Total Posts: 343
23 Apr 2010 11:18 AM
'local user = game.Players.newPlayer'
Since when were they called newPlayer? LocalPlayer, yeah, but...
Report Abuse
gameglicher is not online. gameglicher
Joined: 08 Aug 2009
Total Posts: 1091
23 Apr 2010 12:06 PM
ur script isent working!
Report Abuse
billiland is not online. billiland
Joined: 11 Nov 2008
Total Posts: 4018
23 Apr 2010 12:26 PM
-_- lol
Report Abuse
gameglicher is not online. gameglicher
Joined: 08 Aug 2009
Total Posts: 1091
24 Apr 2010 01:10 PM
i know have:
b = script.Parent.Parent.Time.Value
a = script.Parent.Parent.TextBox

function onClicked(GUI)
b = a.Text
end

script.Parent.MouseButton1Click:connect(onClicked)
Report Abuse
gameglicher is not online. gameglicher
Joined: 08 Aug 2009
Total Posts: 1091
24 Apr 2010 01:12 PM
or;script.Parent.Parent.Parent.Chatted:connect(function(msg)
if string.sub(msg, 1, 3) == "time/"or"Time/" then
script.Parent.Time.Value = (string.sub(msg, 4)
end
end)
Report Abuse
gameglicher is not online. gameglicher
Joined: 08 Aug 2009
Total Posts: 1091
24 Apr 2010 01:36 PM
HElP!!

*cough*flood*cough*Cheak!*cough*
Report Abuse
gameglicher is not online. gameglicher
Joined: 08 Aug 2009
Total Posts: 1091
25 Apr 2010 06:50 AM
plz help!
Report Abuse
gameglicher is not online. gameglicher
Joined: 08 Aug 2009
Total Posts: 1091
25 Apr 2010 08:36 AM
COMON >:(
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