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: InGame Errors?

Previous Thread :: Next Thread 
adeep is not online. adeep
Joined: 06 Feb 2010
Total Posts: 274
23 Nov 2014 06:48 PM
Nothings Wrong this this??

InGame Error says-

local error = script.Mistake <----- Not a valid member of localscript
local clickCheck = script.ClickCheck <----- Not a valid member of localscript

... Directories fine. Works in studio?

I tried changing names?

I used FindFirstChild()

but when I call them later it disconnects because of expection (their nil)...

What am I doing wrong???

Report Abuse
UnConcerning is not online. UnConcerning
Joined: 30 Aug 2012
Total Posts: 676
23 Nov 2014 06:51 PM
they aren't members of localscript wowowwwowowowo
Report Abuse
cxcharlie is not online. cxcharlie
Joined: 26 Aug 2009
Total Posts: 1414
23 Nov 2014 06:53 PM
brb dying


U wot m8
Report Abuse
adeep is not online. adeep
Joined: 06 Feb 2010
Total Posts: 274
23 Nov 2014 06:55 PM
I have them placed inside the script. I had this in the scripts parent then it just said their not valid members of TextBox... Come on man I'll show u full code.. I've done it all right..

Code-

-- gives player new stats (new player)
-- makes sure all field are correctly filled out

--[[
-----------------------------------
Variable names and locations<------
-----------------------------------
stats = player:FindFirstChild("Stats")

Name- Gender / Location- stats
Name- TroopBanner / Location- stats
Name- CityName1 / Location- stats

--]]

local player = game.Players.LocalPlayer
local DataMainFrame = script.Parent.Parent.Parent
local error = script.Mistake
local clickCheck = script.ClickCheck

---------------------
------Variables------
---------------------
local gender = nil
local troopBanner = nil
local cityName = nil
local nickName = nil
---------------------


script.Parent.MouseButton1Click:connect(function()
local stats = player:FindFirstChild("Stats")
if script.Parent.ClickCheck.Value == false then
script.Parent.ClickCheck.Value = true
-----------Gender Section----------------
if DataMainFrame.Gender.GenderChosen.Text == "Male" then
gender = DataMainFrame.Gender.GenderChosen.Text
DataMainFrame.Gender.ErrorMessage.Visible = false
elseif DataMainFrame.Gender.GenderChosen.Text == "Female" then
gender = DataMainFrame.Gender.GenderChosen.Text
DataMainFrame.GenderErrorMessage.Visible = false
else
error.Value = true
DataMainFrame.Gender.ErrorMessage.Visible = true
end
-----------------------------------------
-----------TroopBanner Section-----------
if DataMainFrame.TroopBanner.TroopBannerEntered.Text:len() <= 5 then
if DataMainFrame.TroopBanner.TroopBannerEntered.Text:len() >= 1 then
troopBanner = DataMainFrame.TroopBanner.TroopBannerEntered.Text
DataMainFrame.TroopBanner.ErrorMessage.Visible = false
else
error.Value = true
DataMainFrame.TroopBanner.ErrorMessage.Visible = true
end
else
error.Value = true
DataMainFrame.TroopBanner.ErrorMessage.Visible = true
end
-----------------------------------------
-----------CityName Section--------------
if DataMainFrame.CityName.CityNameEntered.Text:len() <= 10 then
if DataMainFrame.CityName.CityNameEntered.Text:len() >= 1 then
cityName = DataMainFrame.CityName.CityNameEntered.Text
DataMainFrame.CityName.ErrorMessage.Visible = false
else
error.Value = true
DataMainFrame.CityName.ErrorMessage.Visible = true
end
else
error.Value = true
DataMainFrame.CityName.ErrorMessage.Visible = true
end
-----------------------------------------
-----------Nickname Section--------------
nickName = DataMainFrame.NickName.NickNameEntered.Text
-----------------------------------------
if error == false then
-----------Nickname Section--------------
local nickNameNew = Instance.new("StringValue",stats) -- Gives Player Their CityName
nickNameNew.Name = "NickName"
nickNameNew.Value = nickName
wait()
-----------------------------------------
-----------Gender Section----------------
local genderNew = Instance.new("StringValue",stats) -- Gives Player Their Gender
genderNew.Name = "Gender"
genderNew.Value = gender
wait()
-----------------------------------------
-----------TroopBanner Section-----------
local troopBannerNew = Instance.new("StringValue",stats) -- Gives Player Their TroopBanner
troopBannerNew.Name = "TroopBanner"
troopBannerNew.Value = troopBanner
wait()
-----------------------------------------
-----------CityName Section--------------
local cityNameNew = Instance.new("StringValue",stats) -- Gives Player Their CityName
cityNameNew.Name = "CityName1"
cityNameNew.Value = cityName
wait()
-----------------------------------------
else
clickCheck.Value = false
end
end
end)
Report Abuse
TheAwesomenessDude is not online. TheAwesomenessDude
Joined: 17 Jul 2011
Total Posts: 11602
23 Nov 2014 07:29 PM
does it work in studio but not ingame?
Report Abuse
TheAwesomenessDude is not online. TheAwesomenessDude
Joined: 17 Jul 2011
Total Posts: 11602
23 Nov 2014 07:30 PM
nvm

obviously the thing you are trying to access isn't there

it's pretty much impossible for us to know why
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
23 Nov 2014 07:33 PM
local error = script.Mistake <----- Not a valid member of localscript

if script.Parent.ClickCheck.Value == false then

Report Abuse
adeep is not online. adeep
Joined: 06 Feb 2010
Total Posts: 274
23 Nov 2014 09:17 PM
It works in studio and I'll make a tree for you.

Tree-

TextButton <-- Parent of bellow
^
LocalScript <-- Parent of bellow
^
Mistake / ClickCheck

I'm acessing it correctly?
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