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

I'm trying to make a script if player has gamepass and they touch part they get a screengui?

Asked by
danglt 185
6 years ago

local Gamepass = 11111111

local Player = game.Players.LocalPlayer

function onTouched(m) p = m.Parent:findFirstChild("Humanoid") if p ~= nil and game.MarketplaceService:PlayerOwnsAsset(Player,Gamepass) then game.ServerStorage.Ask:Clone(game.Players.LocalPlayer.PlayerGui) end end script.Parent:connect(onTouched)

-- its saying connect is not valid member of part

0
change script.Parent:connect(onTouched) to script.Parent.Touched:connect(onTouched) Azure_Kite 885 — 6y

Answer this question