i want a script that when you touch a part it makes so that a part turns visible but the part does not turn visible and I get no output
this is my script:
script.Parent.Touched:Connect(function()
game.StarterGui.ScreenGui.Frame.Visible = true
end)
Hi, your script is close to correct, just that there are some errors. Here is the correct script:
script.Parent.Touched:Connect(function() for number,player in pairs(game.Players:GetPlayers()) do player.PlayerGui.ScreenGui.Enabled = true --Set ScreenGui.Enabled to false at first. end end)
So basically this is what it does:
1. We get a table of the players using game.Players:GetPlayers() 2. Check for the part being touched 3. Use a generic for loop to handle ScreenGui.Enabled