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
 

Simple script fix?

Previous Thread :: Next Thread 
coolyoshi579 is not online. coolyoshi579
Joined: 03 Aug 2010
Total Posts: 101
05 Sep 2013 09:16 AM
I have just written this code:
local player = game.Players.LocalPlayer
local char = player.Character

local bg = Instace.new("BillboardGui")
bg.Parent = player.PlayerGui
bg.Adornee = char.Head
bg.Size = UDim2.new(1, 0, 1, 0)
-- Makes above head(defaults to inside the head)
bg.StudsOffset = Vector3.new(0, 2, 0)

local frame = Instance.new("Frame")
frame.Parent = bg
frame.Size = UDim2.new(1, 0, 1, 0)
frame.BackgroundTransparency = 1
frame.BorderSizePixel = 0

local text = Instance.new("TextBox")
text.Parent = frame
text.Position = UDim2.new(0.25, 0, 0.25, 0)
text.Size = UDim2.new(0.5, 0, 0.5, 0)
if char.Name ~= "coolyoshi579" then
text.Text = "Newcomer"
else
text.Text = "Creator"
end

The debugger is not showing errors in the script, yet it does not work. By this I mean no text will show above the player. If anyone knows how I can fix this, please respond. Thanks!
Report Abuse
DangCoolIsReal is not online. DangCoolIsReal
Joined: 03 Jun 2013
Total Posts: 4110
05 Sep 2013 09:19 AM
That script should work.
Which line does the script stop working at.
Report Abuse
coolyoshi579 is not online. coolyoshi579
Joined: 03 Aug 2010
Total Posts: 101
05 Sep 2013 09:24 AM
I can't say for certain as I just began scripting :/.
But I have the script in the workspace, should that affect it?
Report Abuse
DangCoolIsReal is not online. DangCoolIsReal
Joined: 03 Jun 2013
Total Posts: 4110
05 Sep 2013 09:26 AM
Put the script in the starter gear.

Also is the script a Local Script?
Report Abuse
coolyoshi579 is not online. coolyoshi579
Joined: 03 Aug 2010
Total Posts: 101
05 Sep 2013 09:28 AM
The script is a normal script, not local.
Report Abuse
DangCoolIsReal is not online. DangCoolIsReal
Joined: 03 Jun 2013
Total Posts: 4110
05 Sep 2013 09:30 AM
Make it local, that should fix it.
Report Abuse
Nick24r7 is not online. Nick24r7
Joined: 13 Sep 2010
Total Posts: 4434
05 Sep 2013 09:33 AM
Make it a local script and put it in playergui.
Report Abuse
coolyoshi579 is not online. coolyoshi579
Joined: 03 Aug 2010
Total Posts: 101
05 Sep 2013 09:39 AM
How would I access playerGui in studio mode?
(Again, sorry I'm really new :/)
Report Abuse
coolyoshi579 is not online. coolyoshi579
Joined: 03 Aug 2010
Total Posts: 101
05 Sep 2013 09:47 AM
Anyone :C
Report Abuse
coolyoshi579 is not online. coolyoshi579
Joined: 03 Aug 2010
Total Posts: 101
05 Sep 2013 09:52 AM
Put it in playerGUI, but it still doesnt work :C
Report Abuse
whyaname98 is not online. whyaname98
Joined: 22 May 2011
Total Posts: 3979
05 Sep 2013 10:59 AM
Did you even write the script? :l

~ I eat haxors ~
Report Abuse
Nick24r7 is not online. Nick24r7
Joined: 13 Sep 2010
Total Posts: 4434
05 Sep 2013 12:19 PM
Before playing solo make sure put it in starter gui then make it a local script. [ My mistake ]
Report Abuse
coolyoshi579 is not online. coolyoshi579
Joined: 03 Aug 2010
Total Posts: 101
05 Sep 2013 12:52 PM
@Nick24r7
Oh Thank you!
@Other guy who asked if I wrote the script :S
I sort of wrote it. I got the script up to the textbox part from the wikia, past that point I wanted to experiment with an if statement, thus I did write that.
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