Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

How can I make my Gamepass script perform this?

Asked by 9 years ago

Now I have this script that allows people to buy a Game pass and get speed and it works. But then you run into a problem instead of giving them the speed every time the re spawn in the game they only get it the first life and I want them to have it the whole entire game every time they join. Say I want to add 9 speed it would the first life but then they don't have it for the rest of the game and I want them to have it forever no matter what. My script that Goulstem helped me with:

local gps = game:GetService("GamePassService");
local id = script:WaitForChild("GamePassID");
local Speed = script:WaitForChild("WalkSpeedAmount");

game.Players.PlayerAdded:connect(function(Player)
    Player:WaitForDataReady()
    if gps:PlayerHasPass(Player , id.Value) then
        repeat wait() until Player.Character~=nil 
        local hum = Player.Character.Humanoid
        hum.WalkSpeed = hum.WalkSpeed + Speed.Value
    end
end)

There is two things in the script a GamePassID which it the ID and the WalkSpeedAmount which is how much speed you want to add. Please help if you can. THANKS!

0
Please don't double post, I answered on your other post. Goulstem 8144 — 9y
0
IT ISNT YOU IDIOT!!!!!!!!!!!!!!!!!!!!!!!!!! YOUR OTHER ONE CAME WITH A PROBLEM JUST LIKE ALL OF YOUR OTHER USELESS ONES! TixyScripter 115 — 9y

Answer this question