CptFlake
(CptFlake)
#1
Ok so im trying to make a script for a npc shop
But the script isnt working nothing happens when i click
Script:
game.Workspace.Jane.ClickDetector.MouseClick:Connect(function()
script.Parent.ScreenGui.frame.visible = true
end)
video of me clicking and it not working:
2 Likes
Try this
game.Workspace.Jane.ClickDetector.MouseClick:Connect(function(player)
player.PlayerGui.ScreenGui.frame.Visible = true
end)
2 Likes
CptFlake
(CptFlake)
#3
Hmm No it didn’t seem to work i don’t know what its wrong.
2 Likes
Well can you tell me the Name of the Gui and the name of the thing that u want to toggle ?
2 Likes
Please make sure you are utilizing the scripting support category correctly! Do you have any errors you can show us?
2 Likes
CptFlake
(CptFlake)
#6
The name of the Gui is just ScreenGui
and the thing im trying to toogle is the frame in side which is just called frame
2 Likes
could u show us a picture of the console error ?
2 Likes
CptFlake
(CptFlake)
#8
Oh wait
I just realised I forgot the caps in the script sorry for the waste of time
3 Likes