Hi. This script is meant to open a player's gui when they touch a part. It used to work but I changed something and the script is broken. No errors either. Can anyone help? I'm gonna rip my hair out soon.

script.Parent.Touched:Connect(function(hit)
	local player = game.Players:GetPlayerFromCharacter(hit.Parent)
	player.PlayerGui.gameShop.Enabled = true
	player.PlayerGui.shop.Enabled = false
	player.PlayerGui.menus.Enabled = false
end)

All help is appreciated.

2 comments

0

I think you should use a remote event to do this.

0

you could just clone the gui and then put it inside the playergui