You problem is that you're attempting to use the StarterGui to change the objects properties. Here's a brief explanation for that:
When a player joins a game, they have a descendant service called PlayerGui. When the PlayerGui is loaded, everything from the games StarterGui gets copied into the PlayerGui.
Everything that is in the PlayerGui is what the player actually sees on their screen, nothing from the StarterGui is visible to them.
So now, to fix your code.
Basically, all we have to do is be able to track the player, then we will be able to change the objects in the PlayerGui. This is a way we could achieve that:
First, change the Script you're using to a Localscript if it's not one already.
Next, we can begin the code with this:
local Player = game.Players.LocalPlayer
This gets the local player from the client. (More on that here)
Lastly, we simply need to add in the rest of the code, and edit it a bit:
script.Parent.MouseButton1Click:connect(function()
Player.PlayerGui.ScreenGui.border.Visible = true
end)
And there you go!
Now, when we put those two things together, this is the final product:
local Player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function()
Player.PlayerGui.ScreenGui.border.Visible = true
end)
Anyways, I hope this helped. if not, or if you have any further problems/questions, please leave a comment below, and I'll see what I can do.
3 comments
Thank you so much! It helped greatly, and thank you for the awesome explanation, it was clear and understanding.
Awesome! Glad you were able to understand it. I'm always happy to help.
Dang dyler3, you have the patience to write out all that information to him. I like to help people with things but typing all that out is too much :P