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 10 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 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!

This is not the same script Goulstem so just go away because every script you give me gives me another problem in my game. Now it only gives the person speed one life they dont have it the whole game to get out of here.

1
Woah, was I rude to you? No. I've been helping you with your scripts that you post. The code i give you is perfectly fine, I know because I constantly have studio open and I check every code I post here before I post it. You're getting problems because of things you messed up on, I'm just trying to help you. But obviously you don't appreciate that so i'll just stop :/ Goulstem 8144 — 10y

Answer this question