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

What would i have to write to do to make a part open a shop?

Asked by 5 years ago

I created a ring where the player is supposed to step on to open the shop my script however wont work:

local Buy = script.Parent

Buy.Touched:Connect(function(HIT)
    local H = HIT.Parent:FindFirstChild("Humanoid")
    if H then
        local Player = game.Players:GetPlayerFromCharacter(HIT.Parent)
        Player.PlayerGui.Shop.Enabled = true

    end
end)

So can anyone tell me what i should write/do instead?

Answer this question