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: Final offer 150 robux to fix this little issue iv had.

Previous Thread :: Next Thread 
spinywind is not online. spinywind
Joined: 26 Jan 2012
Total Posts: 3580
25 Jan 2016 09:26 PM
So when i try cloning the gui so players can see when they leveled up, it doesnt show it put the sound plays when a player levels up. First one to make a working one will get 150 robux. Just make a t shirt and send me a link.


--[[
The main thing i want to fix in this is this gui problem. It wont clone.

function onLevelUp(player, XP, level)
local clone = script.LU:Clone()
clone.Parent = player
wait(6)
script.LU:remove()
script.LevelUpSound:Play()
end
]]--



function onXPChanged(player, XP, level)
if XP.Value>=level.Value * 5 then
level.Value = level.Value + 1
XP.Value = 0

end
end

function onLevelUp(player, XP, level) --Function that the gui clone script is in.
local clone = script.LU:Clone()
clone.Parent = player
wait(6)
script.LU:remove()
script.LevelUpSound:Play()
end



function onPlayerEntered(newPlayer)

local stats = Instance.new("IntValue")
stats.Name = "leaderstats"
local stats2 = Instance.new("IntValue")
stats2.Name = "Tycoon"


local cash = Instance.new("IntValue")
cash.Name = "Cash:"
cash.Value = 0

local kills = Instance.new("IntValue")
kills.Name = "Kills:"
kills.Value = 0

local deaths = Instance.new("IntValue")
deaths.Name = "Deaths:"
deaths.Value = 0

local level = Instance.new("IntValue")
level.Name = "Level"
level.Value = 1

local xp = Instance.new("IntValue")
xp.Name = "XP"
xp.Value = 0

cash.Parent = stats
stats2.Parent = newPlayer
stats.Parent = newPlayer
kills.Parent = stats
deaths.Parent = stats
level.Parent = stats
xp.Parent = stats

xp.Changed:connect(function() onXPChanged(newPlayer, xp, level) end)
level.Changed:connect(function() onLevelUp(newPlayer, xp, level) end) -- changed event function when a player levels up
-- being called



Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
25 Jan 2016 09:29 PM
"local clone = script.LU:Clone()
clone.Parent = player"

should be Player.PlayerGui

make sure it's visible
Report Abuse
LegendaryAccount is not online. LegendaryAccount
Joined: 02 Jun 2010
Total Posts: 13193
25 Jan 2016 09:32 PM
you are defining the onLevelUp function twice


Report Abuse
LegendaryAccount is not online. LegendaryAccount
Joined: 02 Jun 2010
Total Posts: 13193
25 Jan 2016 09:32 PM
nvm it was in a comment


Report Abuse
spinywind is not online. spinywind
Joined: 26 Jan 2012
Total Posts: 3580
25 Jan 2016 09:35 PM
i dont have a variable for player to connect to local player could that be it.?


Report Abuse
spinywind is not online. spinywind
Joined: 26 Jan 2012
Total Posts: 3580
25 Jan 2016 09:40 PM
ok now the gui works but it wont go away/ be removed


Report Abuse
spinywind is not online. spinywind
Joined: 26 Jan 2012
Total Posts: 3580
25 Jan 2016 09:47 PM
o i fixed the remove thing i just had to locate the gui right.


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