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

Any way To Make a Game Pass that changes Team/position?

Asked by 6 years ago
Edited 6 years ago

I need a way to change team and position after a pressing a button and makes sure you bought a game pass.

I've tried this :


local pla = game.Players.LocalPlayer game.Players.PlayerAdded:Connect (function(player) player.CharacterAdded:Connect (function(character) if game.MarketplaceService:PlayerOwnsAsset(player,1288405181) then script.Parent.MouseButton1Click:connect(function() local Plteam = game.Teams.Criminals script.Parent.MouseButton1Click:connect(function() pla.Team = Plteam end) end) end end) end)

I have connected this to a button connect to a frame connected to a starter gui in the starter gui folder

0
Is this a local script or a script? Have you got Filtering Enabled? Aimarekin 345 — 6y
0
Script,And no idea (i tried it but i do not know if it worked) fireburnpokemon 16 — 6y
0
ok yes it is filtered fireburnpokemon 16 — 6y

1 answer

Log in to vote
0
Answered by
Audiimo 105
6 years ago
Edited 6 years ago

Try switching the game.MarketplaceService if statement with the script.Parent.MouseButton1Click:connect(function(). This may be your problem.

local pla = game.Players.LocalPlayer
local Plteam = game.Teams.Criminals     
game.Players.PlayerAdded:Connect (function(player)
    player.CharacterAdded:Connect (function(character)
        if game.MarketplaceService:PlayerOwnsAsset(player,1288405181) then
            script.Parent.MouseButton1Click:connect(function()                              
                script.Parent.MouseButton1Click:connect(function()
                    pla.Team = Plteam
                end)
            end)
        end
    end)
end)
0
Sorry but it did not work... fireburnpokemon 16 — 6y
0
But if you want to know how im using it so you can figure out what im trying to do: https://www.roblox.com/games/1292630992/Prison fireburnpokemon 16 — 6y
Ad

Answer this question