script.Parent.TouchEnded:Connect(function(hit)
local player = game:GetService(“Players”):GetPlayerFromCharacter(hit.Parent)
if player then
IndexFrame.Visible = false
NormalCrate.Visible = false
end
end)
The index frame becomes invisible, however, the normal crate frame remains visible. The property only changes on the server.
Where are the paths for the Frames? Make sure you index the frames paths from the player’s PlayerGui instead of StarterGui first after you get the player, then make them invisible.
I already did, and yes, this is not a localscript.
script.Parent.TouchEnded:Connect(function(hit)
local player = game:GetService(“Players”):GetPlayerFromCharacter(hit.Parent)
if player then
player.PlayerGui.Crates.NormalCrate.Visible = false
player.PlayerGui.Crates.IndexFrame.Visible = false
print("Visible: ", player.PlayerGui.summonUnits.NormalCrate.Visible)
end
end)