Hello everyone. I made a instant respawn gamepass script however, i have a problem that when you buy the gamepass it does not change the respawn time. can somebody tell me what is wrong with this script
local MarketplaceService = game:GetService("MarketplaceService")
local SpawnTime = game.Players.RespawnTime
local gamepassID = 14356665
MarketplaceService.PromptGamePassPurchaseFinished:Connect(function(player, purchasepassID, purchaseSuccess)
if purchaseSuccess == true and purchasepassID == gamepassID then
local SpawnTime = 1
end
end)
