So im trying to get the client to tell the server to level up the player when the player's exp is 25 times the players level but so far it isnt working
--Client Side(located in starter gui)
function levelup(player)
if (game.Players.LocalPlayer.ldr.Exp >= game.Players.LocalPlayer.ldr.Level*25) then
local levelup = game.ReplicatedStorage.RemoteEvents.lvlevent:InvokeServer()
end
end
--Server Side(located in server script storage
function levelup(player)
local exp = player.ldr.Exp
if (exp.Value ) then
math.floor(player.ldr.Level.Value*25)
math.floor(exp.Value - player.ldr.Level.Value*25)
return true
end
return false
end
game.ReplicatedStorage.RemoteEvents.lvlevent.OnServerEvent = levelup

1 comment
line 12. OnServerEvent should be OnServerInvoke