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

can i make this so that players dont have to wear VIP shirt to buy this car?

Asked by
MHaven1 159
8 years ago
factory = game.Lighting
local ting = 0
Upgradecost = script.Parent.Parent.Value.Value
local shirt = "http://www.roblox.com/asset/?id=161319468"
function onTouched(hit)
    if ting == 0 then
        ting = 1
        local h = hit.Parent:FindFirstChild("Humanoid")
        local stats = game.Players:GetPlayerFromCharacter(hit.Parent):FindFirstChild("leaderstats")
        if h ~= nil then
            if hit.Parent:FindFirstChild("Shirt Graphic") ~= nil then
                if hit.Parent:FindFirstChild("Shirt Graphic").Graphic == shirt then
                    local cash = stats:FindFirstChild("Money")
                    if cash.Value > (Upgradecost-1) then
                        car = factory.Car1:Clone()
                        car.Parent = game.Workspace
                        car:MakeJoints()
                        ting = 0
                    end
                end
            end
        end     
    end
end
script.Parent.Touched:connect(onTouched)

is there a way i could change this script so that the players dont have to wear the VIP shirt to buy this car. so basically if they own this VIP shirt they dont have to wear it in the game to buy the car. please help me. Thank you!

2
Use a gamepass if you want the car to cost, not a shirt graphic. User#11440 120 — 8y
1
Use PlayerOwnsAsset of MarketplaceService M39a9am3R 3210 — 8y
0
m39 is there an artical on roblox wiki about playerownasset? MHaven1 159 — 8y
0
ty i dont it. thank you @M39a9am3R MHaven1 159 — 8y

Answer this question