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: Rename Tycoon Gui [Help me with this]

Previous Thread :: Next Thread 
Dushax is not online. Dushax
Joined: 28 Apr 2010
Total Posts: 12892
19 Aug 2014 10:17 AM
Basically I want to let the cilent change the name of his/her tycoon but it doesn't work. Can you help me sort it out? There's an output I didn't understand btw, it did mention about this 'a nil value'.

Output Statement:

Players.Player1.PlayerGui.RenameGui.Frame.Button.LocalScrip:5: attempt to index global 'tycoon' (a nil value)




LocalScript:



P = game.Players.LocalPlayer

function Rename()
tycoon = game.Workspace:FindFirstChild(P.Name.."'s Tycoon")
tn = tycoon.TycoonName
tycoon.Main:FindFirstChild("Tycoon").Name = P.Name.."'s "..script.Parent.Parent.RenameBox.Text
script.Parent.Parent.Parent.Frame:TweenPosition(UDim2.new(0, -500, 0.5, 0), "Out", 2)
for GuiReveal = 1, 0, -0.05 do
P.PlayerGui.TycoonGui.Notice.Text = "You have now re-named your "..tn.Value..", "..P.Name.."!"
P.PlayerGui.TycoonGui.Notice:TweenPosition(UDim2.new(0, 0, 0, 50), Out, Quad, 0.8, false)
P.PlayerGui.TycoonGui.Notice.Transparency = GuiReveal
wait()
end
wait(3)
for GuiReveal = 0, 1, 0.15 do
P.PlayerGui.TycoonGui.Notice:TweenPosition(UDim2.new(0, 0, 0, 50), Out, Quad, 0.8, false)
P.PlayerGui.TycoonGui.Notice.Transparency = GuiReveal
wait()
end
end

script.Parent.MouseButton1Down:connect(Rename)


Report Abuse
TheMrRadioActiveMan is not online. TheMrRadioActiveMan
Joined: 11 Dec 2010
Total Posts: 974
19 Aug 2014 10:20 AM
the output?
Report Abuse
Tripane is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
19 Aug 2014 10:21 AM
he posted the output e_e

you didn't make "tycoon" a local value

Report Abuse
Tripane is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
19 Aug 2014 10:22 AM
"tycoon = game.Workspace:FindFirstChild(P.Name.."'s Tycoon")
tn = tycoon.TycoonName"

local tycoon = game.Workspace:FindFirstChild(P.Name.."'s Tycoon")
tn = tycoon.TycoonName

local tn = tycoon.TycoonName
Report Abuse
Dushax is not online. Dushax
Joined: 28 Apr 2010
Total Posts: 12892
19 Aug 2014 10:22 AM
'the output?'

Have you not used one in Roblox Studio before? You use the Output to check for problems with your scripts.
Report Abuse
Dushax is not online. Dushax
Joined: 28 Apr 2010
Total Posts: 12892
19 Aug 2014 10:23 AM
@Trip

Shall I put that into 'Script' instead of LocalScript?
Report Abuse
TheMrRadioActiveMan is not online. TheMrRadioActiveMan
Joined: 11 Dec 2010
Total Posts: 974
19 Aug 2014 10:24 AM
Lol i didn't see the output
Report Abuse
Tripane is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
19 Aug 2014 10:24 AM
you're dealing with specific players, so no
Report Abuse
Dushax is not online. Dushax
Joined: 28 Apr 2010
Total Posts: 12892
19 Aug 2014 11:19 AM
Ah right, okay.
Report Abuse
Dushax is not online. Dushax
Joined: 28 Apr 2010
Total Posts: 12892
19 Aug 2014 11:23 AM
Didn't work. :/
Report Abuse
Tripane is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
19 Aug 2014 11:28 AM
Any new output?
Report Abuse
Dushax is not online. Dushax
Joined: 28 Apr 2010
Total Posts: 12892
19 Aug 2014 11:42 AM
Players.Player1.PlayerGui.RenameGui.Frame.Button.LocalScrip:5: attempt to index local 'tycoon' (a nil value)
Report Abuse
Dushax is not online. Dushax
Joined: 28 Apr 2010
Total Posts: 12892
19 Aug 2014 12:07 PM
bump
Report Abuse
baheeg is not online. baheeg
Joined: 19 Jul 2010
Total Posts: 72846
19 Aug 2014 12:12 PM
"LocalScrip"
"Scrip"
Report Abuse
Dushax is not online. Dushax
Joined: 28 Apr 2010
Total Posts: 12892
19 Aug 2014 12:24 PM
@baheeg

wut
Report Abuse
Dushax is not online. Dushax
Joined: 28 Apr 2010
Total Posts: 12892
19 Aug 2014 12:48 PM
Will anyone please help make my script a complete script? :/
Report Abuse
HardCoreBlink is not online. HardCoreBlink
Joined: 15 Mar 2014
Total Posts: 24
19 Aug 2014 12:52 PM
Dude you put Scrip instead of script, in 2 places.
Report Abuse
Dushax is not online. Dushax
Joined: 28 Apr 2010
Total Posts: 12892
19 Aug 2014 12:57 PM
No I didn't, the output just says.
Report Abuse
Dushax is not online. Dushax
Joined: 28 Apr 2010
Total Posts: 12892
19 Aug 2014 01:26 PM
bump2
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