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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: numbervalue error

Previous Thread :: Next Thread 
AdvancedDrone is not online. AdvancedDrone
Joined: 17 Apr 2010
Total Posts: 2599
28 Sep 2015 05:29 PM
Button.MouseButton1Down:connect(function(Drone)
if TxtBox.Text == CashCode then
game.ServerStorage.MoneyStorage:FindFirstChild(Drone.Name).Value = cashReward
TxtBox.Text = TxtBoxText
wait(3)
TxtBox.Text = "Enter Code Here"
end
end)

output:
Players.Player1.PlayerGui.ScreenGui.Code.TextButton.LocalScript:21: attempt to index local 'Drone' (a number value)

the 3rd line is line 21 which is the error line



chekm8
Report Abuse
Someguy1002 is not online. Someguy1002
Joined: 27 Dec 2012
Total Posts: 195
28 Sep 2015 05:32 PM
:FindFirstChild(Drone.Name)

I don't get what you are doing with the above line. It should be something like :FindFirstChild("Drone")
Report Abuse
AdvancedDrone is not online. AdvancedDrone
Joined: 17 Apr 2010
Total Posts: 2599
28 Sep 2015 05:34 PM
in ServerStorage>MoneyStorage i have a value named the players name so if i joined the game i will have a value in MoneyStorage called AdvancedDrone which is what im trying to recieve and if i edit the value of that value then it changes my cash



chekm8
Report Abuse
AdvancedDrone is not online. AdvancedDrone
Joined: 17 Apr 2010
Total Posts: 2599
28 Sep 2015 05:38 PM
bump



chekm8
Report Abuse
IllegallyBlind is not online. IllegallyBlind
Joined: 07 Nov 2010
Total Posts: 1691
28 Sep 2015 05:39 PM
wiki.roblox.com


Netflix and chill? I prefer Blockbuster and relax.
Report Abuse
AdvancedDrone is not online. AdvancedDrone
Joined: 17 Apr 2010
Total Posts: 2599
28 Sep 2015 05:39 PM
go back to abc mouse u hav life time membur ship pls someone fix my code


chekm8
Report Abuse
Zakusa is not online. Zakusa
Joined: 16 Feb 2013
Total Posts: 359
28 Sep 2015 05:40 PM
if TxtBox.Text == "CashCode" then*
Report Abuse
AdvancedDrone is not online. AdvancedDrone
Joined: 17 Apr 2010
Total Posts: 2599
28 Sep 2015 05:41 PM
i have variables before that. ill pay 50 rbx for a fix

i already have like 6 variables defining most of my stuff in this error script.
Report Abuse
tbnj123 is online. tbnj123
Joined: 29 Oct 2010
Total Posts: 443
28 Sep 2015 05:43 PM
"Button.MouseButton1Down:connect(function(Drone)"
http://wiki.roblox.com/index.php?title=API:Class/GuiButton/MouseButton1Down

RBXScriptSignal MouseButton1Down (
int x,
int y
)
Report Abuse
Zakusa is not online. Zakusa
Joined: 16 Feb 2013
Total Posts: 359
28 Sep 2015 05:43 PM
ok can i has all the variables i want to try this on studio and i dont need robux
Report Abuse
AdvancedDrone is not online. AdvancedDrone
Joined: 17 Apr 2010
Total Posts: 2599
28 Sep 2015 05:44 PM
local Button = script.Parent
local TxtBox = Button.Parent.TextBox
local script = script.Parent
local TxtBoxText = "Redeemed!"
local DefaultText = "Enter Code Here"

-- // CODE \\ --

local Code = "TheDroneArmy"

-- // PRIZES \\ --

local PRIZE_LOCATION = game:GetService("ServerStorage").Prizes

local cashReward = 250 -- cash u want to giv from code
local CashCode = "G1V3M3C4SH" -- set code to something random if u want to deactivate it
PRIZE_LOCATION.CashValue.Value = cashReward

Button.MouseButton1Down:connect(function(Drone)
if TxtBox.Text == CashCode then
game.ServerStorage.MoneyStorage:FindFirstChild(Drone.Name).Value = cashReward
TxtBox.Text = TxtBoxText
wait(3)
TxtBox.Text = "Enter Code Here"
end
end)



chekm8
Report Abuse
tbnj123 is online. tbnj123
Joined: 29 Oct 2010
Total Posts: 443
28 Sep 2015 05:47 PM
sigh MouseButton1Down does not return wat u want ok,
returns coords of ur mouse when u clicked lol...
Report Abuse
AdvancedDrone is not online. AdvancedDrone
Joined: 17 Apr 2010
Total Posts: 2599
28 Sep 2015 05:48 PM
fix my code for 50 robux just reply with fixed version and ur t-shirt link



chekm8
Report Abuse
Zakusa is not online. Zakusa
Joined: 16 Feb 2013
Total Posts: 359
28 Sep 2015 05:48 PM
too many textbuttons and stuff sorry but i cant help
Report Abuse
Zakusa is not online. Zakusa
Joined: 16 Feb 2013
Total Posts: 359
28 Sep 2015 05:51 PM
you can invite me to party and i can help you in there because i dont really know what your trying to do
Report Abuse
tbnj123 is online. tbnj123
Joined: 29 Oct 2010
Total Posts: 443
28 Sep 2015 05:54 PM
assuming ur script is not a localscript...else use a different storage....

Plr = blahblahwhatever(game.Players.LocalPlayer if localscript)
local Button = script.Parent
local TxtBox = Button.Parent.TextBox
local script = script.Parent
local TxtBoxText = "Redeemed!"
local DefaultText = "Enter Code Here"

-- // CODE \\ --

local Code = "TheDroneArmy"

-- // PRIZES \\ --

local PRIZE_LOCATION = game:GetService("ServerStorage").Prizes

local cashReward = 250 -- cash u want to giv from code
local CashCode = "G1V3M3C4SH" -- set code to something random if u want to deactivate it
PRIZE_LOCATION.CashValue.Value = cashReward

local debounce = false
Button.MouseButton1Down:connect(function()
if debounce then return end
debounce = true
if TxtBox.Text == CashCode then
local Drone = FindFirstChild(Plr.Name)
Drone.Value = cashReward
TxtBox.Text = TxtBoxText
wait(3)
TxtBox.Text = "Enter Code Here"
end
debounce = false
end)
Report Abuse
tbnj123 is online. tbnj123
Joined: 29 Oct 2010
Total Posts: 443
28 Sep 2015 05:56 PM
that fail tho...

Plr = blahblahwhatever(game.Players.LocalPlayer if localscript)
local Button = script.Parent
local TxtBox = Button.Parent.TextBox
local script = script.Parent
local TxtBoxText = "Redeemed!"
local DefaultText = "Enter Code Here"

-- // CODE \\ --

local Code = "TheDroneArmy"

-- // PRIZES \\ --

local PRIZE_LOCATION = game:GetService("ServerStorage").Prizes

local cashReward = 250 -- cash u want to giv from code
local CashCode = "G1V3M3C4SH" -- set code to something random if u want to deactivate it
PRIZE_LOCATION.CashValue.Value = cashReward

local debounce = false
Button.MouseButton1Down:connect(function()
if debounce then return end
debounce = true
if TxtBox.Text == CashCode then
local Drone = game.ServerStorage.MoneyStorage:FindFirstChild(Plr.Name)
Drone.Value = cashReward
TxtBox.Text = TxtBoxText
wait(3)
TxtBox.Text = "Enter Code Here"
end
debounce = false
end)
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