Gui doesn't pop upon touch of brick?
01 | script.Parent.Touched:Connect( function (HIT) |
02 | local player = game.Players:GetPlayerFromCharacter(HIT.Parent) |
03 | if player = = game.Players.LocalPlayer then |
04 | player.PlayerGui.ScreenGui.Shop.Visible = true |
08 | script.Parent.TouchEnded:Connect( function (HIT) |
09 | local player = game.Players:GetPlayerFromCharacter(HIT.Parent) |
10 | if player = = game.Players.LocalPlayer then |
11 | player.PlayerGui.ScreenGui.Shop.Visible = false |
This is in a local script in a brick.
What is wrong here?