|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
| |
|
|
| 28 Sep 2015 05:39 PM |
wiki.roblox.com
Netflix and chill? I prefer Blockbuster and relax. |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| Joined: 16 Feb 2013 |
| Total Posts: 359 |
|
|
| 28 Sep 2015 05:40 PM |
| if TxtBox.Text == "CashCode" then* |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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 |
|
|