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: Weird Issue

Previous Thread :: Next Thread 
spinywind is not online. spinywind
Joined: 26 Jan 2012
Total Posts: 3580
08 Nov 2016 04:01 PM
if Level.Value < MaxLevel and Xp.Value > XpRequired then
local LevelUpUI = LevelUpGui:Clone()
LevelUpUI.PrestigeEmblem.Level.Text = "Level"
LevelUpUI.Parent = Player.PlayerGui --This isn't working and there are no errors
Xp.Value = Xp.Value - XpRequired -- this is working
Level.Value = Level.Value + 1 --this is working...
end;


Im really confused because the script doesn't stop so its clearly working but when i check PlayerGui i dont see anything....


Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
08 Nov 2016 04:08 PM
Put a print in the statement to see if it's even firing.
Report Abuse
spinywind is not online. spinywind
Joined: 26 Jan 2012
Total Posts: 3580
08 Nov 2016 04:09 PM
already have 1 in there and it is.


Report Abuse
spinywind is not online. spinywind
Joined: 26 Jan 2012
Total Posts: 3580
08 Nov 2016 04:10 PM
Never mind its not.


Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
08 Nov 2016 04:10 PM
Any errors in output?
Report Abuse
spinywind is not online. spinywind
Joined: 26 Jan 2012
Total Posts: 3580
08 Nov 2016 04:11 PM
Nope, nothing related to this script.


Report Abuse
spinywind is not online. spinywind
Joined: 26 Jan 2012
Total Posts: 3580
08 Nov 2016 04:11 PM
Her is the entire script:


local GamePlayerStats = game.ServerStorage["Player Stats"]
local LevelUpGui = script.LevelObjects["Level Up"]
local MaxLevel = 55
local MaxPrestige = 10



game.Players.PlayerAdded:connect(function(Player)
GamePlayerStats:WaitForChild(Player.Name)
local PlayerStats = GamePlayerStats[Player.Name]
local Xp = PlayerStats.XP
Xp.Changed:connect(function()
local Level = PlayerStats.Level
local XpRequired = ((((Level.Value*25)*3.5)+750))
if Level.Value < MaxLevel and Xp.Value > XpRequired then
local LevelUpUI = LevelUpGui:Clone()
LevelUpUI.PrestigeEmblem.LevelV.Text = "Level"
LevelUpUI.Parent = Player.PlayerGui
Xp.Value = Xp.Value - XpRequired
Level.Value = Level.Value + 1
print("Level Up!")
end;
end);
end);


Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
08 Nov 2016 04:12 PM
"nothing related to this script"

Implying your game is full of broken scripts? T_T
Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
08 Nov 2016 04:13 PM
Didn't I fix that code for you the other day on another post?
Report Abuse
spinywind is not online. spinywind
Joined: 26 Jan 2012
Total Posts: 3580
08 Nov 2016 04:14 PM
No, i dont use free models lol. I actually made sure to check all my scripts to see if anything was removing it but nothing. Also i have a different script that clones a gui in player gui on a changed event that works fine so i know nothing is destroying that.


Report Abuse
spinywind is not online. spinywind
Joined: 26 Jan 2012
Total Posts: 3580
08 Nov 2016 04:14 PM
Yes :3


Report Abuse
spinywind is not online. spinywind
Joined: 26 Jan 2012
Total Posts: 3580
08 Nov 2016 04:15 PM
Yes you fixed something in it i just forgot.


Report Abuse
spinywind is not online. spinywind
Joined: 26 Jan 2012
Total Posts: 3580
08 Nov 2016 04:15 PM
I just modified it a bit and added stuff.


Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
08 Nov 2016 04:20 PM
stat, max, maxpre, gui = game.ServerStorage:WaitForChild'Player Stats', 55, 10, script:WaitForChild'LevelObjects':WaitForChild'Level Up'

game.Players.PlayerAdded:connect(function(p)
local ps = stat:WaitForChild(p.Name)
local level, xp = ps:WaitForChild'Level', ps:WaitForChild'XP'
xp.Changed:connect(function()
local req = math.floor((((level*20)*1.5)+750)/2)
if level < max and xp.Value > req then
xp.Value = xp.Value - req
level.Value = level.Value + 1
local UI = gui:Clone()
UI.PrestigeEmblem.LevelV.Text = "Level "..level.Value
UI.Parent = p.PlayerGui
end
end)
end)
Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
08 Nov 2016 04:21 PM
UI.PrestigeEmblem.LevelV.Text = 'Level '..level.Value..'!'
Report Abuse
spinywind is not online. spinywind
Joined: 26 Jan 2012
Total Posts: 3580
08 Nov 2016 04:22 PM
Didn't work... let me try resetting studio


Report Abuse
spinywind is not online. spinywind
Joined: 26 Jan 2012
Total Posts: 3580
08 Nov 2016 04:24 PM
ok something is wrong, i removed the all the Gui stuff and set the script to where everything worked before and now its not running after Level.Value = Level.value + 1


Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
08 Nov 2016 04:24 PM
Add a print after the variables to see if the objects are being found.

stat, max, maxpre, gui = game.ServerStorage:WaitForChild'Player Stats', 55, 10, script:WaitForChild'LevelObjects':WaitForChild'Level Up'

print'Objects found, now the function can load.'
Report Abuse
spinywind is not online. spinywind
Joined: 26 Jan 2012
Total Posts: 3580
08 Nov 2016 04:28 PM
did this: stops after 2..

local GamePlayerStats = game.ServerStorage["Player Stats"]
--local LevelUpGui = script.LevelObjects["Level Up"]
local MaxLevel = 55
local MaxPrestige = 10



game.Players.PlayerAdded:connect(function(Player)
GamePlayerStats:WaitForChild(Player.Name)
local PlayerStats = GamePlayerStats[Player.Name]
print("1")
local Xp = PlayerStats.XP
print("2")
Xp.Changed:connect(function()
print("2.5")
local Level = PlayerStats.Level
print("3")
local XpRequired = ((((Level.Value*25)*3.5)+750))
print("4")
if Level.Value < MaxLevel and Xp.Value > XpRequired then
Xp.Value = Xp.Value - XpRequired
print("5")
Level.Value = Level.Value + 1

print("Level Up!")
end;
end);
end);




Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
08 Nov 2016 04:30 PM
That's your problem your not using the code I made that fixed that.
Bye now.
Report Abuse
spinywind is not online. spinywind
Joined: 26 Jan 2012
Total Posts: 3580
08 Nov 2016 04:31 PM
I tried it and it still didnt work..


Report Abuse
spinywind is not online. spinywind
Joined: 26 Jan 2012
Total Posts: 3580
08 Nov 2016 04:33 PM
Im so sorry wasting your time, i figured i was changing the level value not xp value..... the function is a changed function of xp........


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