Forum > Coding >

Values reset after character reset

Posts: 17

Threads: 10

Joined: Jan, 2021

Reputation: 0

Posted

I have a bool value named "isLeader" in workspace.playername and normally it is false.

I have written this script to change it to true

local service = game:GetService("Workspace")

game.ReplicatedStorage.makeLeader.OnServerEvent:Connect(function(player)
service[tostring(player)].isLeader.Value = true
end)

It changes the value to true, but when the player resets their character it goes back to false.

What is the problem here?

 

Thanks in advance.

  • 0

I’m not lazy, I’m just on energy saving mode.

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )