**--This is a server script inside a part and it prints but its not making the Gui Visible:**
script.Parent.MouseButton1Click:Connect(function()
print("AAAAAAAAAAA")
game:GetService("StarterGui").AskToBuy.Frame.Visible=true
end)
✓ ANSWER ACCEPTED
How to make the Gui visible thru a part?
1 answer
✓ Accepted answer
you cant change the startergui so instead u do this
script.Parent.MouseButton1Click:Connect(function()
print("AAAAAAAAAAA")
game:GetService("Players").LocalPlayer.PlayerGui.AskToBuy.Frame.Visible = true--this access ur own gui instead of the gui everyone has and spawns with
end)
3 comments
0
He/she said it was a ServerScript so that would not work.
0
it wont work with a server script since we need to access the player gui which is on the client side, only a local script can access the client side
0
I found another way to do that...I told a LocalScript to make my camera change to the CameraPart by hitting a specific part inside workspace and change its position so it won't hit again,then i made the Gui that when it closes itself it will wait 5 seconds and it will change the part position back to normal and the camera as well :D Thanks anyway
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Can i ask how do i make it happen?
The StarterGUI is a blueprint for the player. StarterGUI's contents are copied and put into each players "PlayerGui" once they join. If you want to reference a specific players GUI, you would need to access their PlayerGui, rather than the StarterGUI.