You don’t necessarily have to do localplayer and if player I think that’s causing the error. You can also just script.MouseButton1click: Connect(function()and then whatever you want underneath.
So then it becomes:
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.Parent.Yourscreengui.Frame.Visible = true
end)
``
5a_ne
(che)
June 17, 2020, 8:03pm
#63
Wdym the name of the local script?
Abroxus
(Abroxus)
June 17, 2020, 8:04pm
#64
Update the local script with this script, you have changed the ScreenGui’s name so we want to let the script know that too.
Input my code into the script skns
5a_ne
(che)
June 17, 2020, 8:05pm
#66
Still doesn’t do anything. ( No errors in Output though)
Abroxus
(Abroxus)
June 17, 2020, 8:06pm
#67
Change it to this?
Make sure the Frame is not visible in the first place.
Then try my script
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.Parent.Yourscreengui.Frame.Visible = true
end)
this should work
‘’’
‘’‘’
script.Parent.MouseButton1Click:Connect(function()
local player = game.Players.LocalPlayer
if player then
player.PlayerGui.ScreenGui.Frame.Visible = true
end
end)
'''
'''
4 Likes
5a_ne
(che)
June 17, 2020, 8:08pm
#71
They both work. 30 characters…
Have you done the exact name of your screen gui?
Abroxus
(Abroxus)
June 17, 2020, 8:09pm
#74
I’m guessing your typing them incorrectly…
5a_ne
(che)
June 17, 2020, 8:10pm
#75
Yours worked! (30 Chars…)
Send what you got from my script.
5a_ne
(che)
June 17, 2020, 8:10pm
#77
KamikazeKid’s Script
script.Parent.MouseButton1Click:Connect(function()
local player = game.Players.LocalPlayer
if player then
player.PlayerGui.Shop.Frame.Visible = true
end
end)
Worked.
They all work you just type them wrong.
5a_ne
(che)
June 17, 2020, 8:11pm
#79
yeah probably lol (thanks for helping though!)
5a_ne
(che)
June 17, 2020, 8:11pm
#80
Thanks for helping! (30 chars…)