I’m wondering if it’s even possible to detect if a player has recently spawned. I’m thinking I could use a CharacterAdded function, but that won’t work for the first time it should be called, as it’s running in a LocalScript. If anybody could help, that’d be awesome.
you can do it on PlayerAdded as well as CharacterAdded then
players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) local LastSpawned = os.time() --// set this value to an Int Value object, so you can index this local IntValue = Instance.new("IntValue") --// the value would have to exist already, --// not each time a player respawns (demonstration) IntValue.Value = LastSpawned IntValue.Parent = player end) end)
to get the time since a player last spawned, do this
print(os.time() - IntValue.Value)