For some reason i get getting a Error: " Workspace.Shops.Shop1.Part.Script:5: attempt to index nil with 'Level' ", anyone know how to fix this? Here is the script
local ShopLevel = 1
local function onTouch(hit)
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if plr.Level.Value == ShopLevel or plr.Level.Value > ShopLevel then
if plr.PlayerGui:FindFirstChild("ShopGui") then return end
local gui = game.Lighting.GUIs:FindFirstChild("ShopGui")
gui:Clone().Parent = plr.PlayerGui
end
end
script.Parent.Touched:connect(onTouch)
