Link to video to show the bug.
I don’t know why this happens, but it’s weird. Here’s the script.
script.Parent.MouseButton1Down:Connect(function(hit)
script.Parent.Parent.Parent.Enabled = false
game.StarterGui.Inventory.ImageButton.Visible = true
end)
Everything is fine except the button.
The script for the button to open the inventory.
script.Parent.MouseButton1Down:Connect(function(hit)
script.Parent.Visible = false
script.Parent.Parent.Parent.ScreenGui.Enabled = true
end)
I don’t know if it’s the rotate script causing the problem. But it’s strange.
1 | script.Parent.MouseButton 1 Down:Connect( function (hit) |
2 | script.Parent.Parent.Parent.Enabled = false |
3 | game.Players.LocalPlayer.PlayerGui.Inventory.ImageButton.Visible = true |
4 | end ) |
5 | |
6 | script.Parent.MouseButton 1 Down:Connect( function (hit) |
7 | script.Parent.Visible = false |
8 | script.Parent.Parent.Parent.ScreenGui.Enabled = true |
9 | end ) |
You must use “game.Players.LocalPlayer.PlayerGui” in order to change things of a GUI. StarterGUI clones the children inside the joining player’s PlayerGUI, not view it.