Basically I want to make a part that gives more speed when you buy a game pass. I want the player to be able to change speeds so how can I make it that when someone buys a game pass it let's them touch the part, if they don't but the game pass they can't touch.
Hey there! If I understand your question correctly, then I believe that this is all that you need to do:
script.Parent.Touched:Connect(function(e) -- Detects touch if e.Parent:FindFirstChild("Humanoid") then -- Checks to make sure a player touched it local gamepass = 12345678 --Change this to your gamepass ID local player = game.Players:FindFirstChild(e.Parent.Name) local service = game:GetService("MarketplaceService") if service:UserOwnsGamePassAsync(player.UserId,gamepass) then e.Parent.Humanoid.WalkSpeed = 100 -- Change this to the speed you want end end end)
Hope this helps!
~Amanda314159