Who can help - help, urgently needed. I need a script that will make it so that when the PLAYER reaches level 100, the RESET button will appear on the screen. I tried to write a script, it didn’t work, please help. Additionally: how to make sure that all the weapons that the player received disappear after a reset?
just add an event listener that listens for changes in the player's level.. for example:
make sure you listen changes server side, because the client could change the values and the reset button will appear..
game.Players.PlayerAdded:Connect(function(player) local stats = Instance.new("Folder",player) local level = Instance.new("IntValue",stats) stats.Name = "Level"; --load data from data store or create new data if there is none in datastore.. level.Value = --[set to value returned from data store or an initial value.] level.Changed:Connect(function() if(leve.Value >= 100) then print("player has reached level 100") local reset_button = player.PlayerGui.x.x.x-- set to where the reset button is reset_button.Visible = true reset_button.MouseButton1Down:Connect(function() local character = player.Character character:WaitForChild("Humanoid"):UnequipTools(); --code to remove weapons end) end end) end)