Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make the Gui visible thru a part?

Asked by 5 years ago
**--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)
0
Can i ask how do i make it happen? bostaffmanbulgaria1 89 — 5y
0
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. MezornoIV 25 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

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)
0
He/she said it was a ServerScript so that would not work. Lucke0051 165 — 5y
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 Gameplayer365247v2 1055 — 5y
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 bostaffmanbulgaria1 89 — 5y
Ad

Answer this question