Ok So I assume you are doing this. Say you get an item by clicking on it. You click Scoobis.
I actually use a click detector inside my code.
This script is inside the part I want to click.
local Clickable = script.Parent
local ClickDetector = Instance.new("ClickDetector")
ClickDetector.Parent = Clickable
ClickDetector.MaxActivationDistance = 20
ClickDetector.MouseHoverEnter:Connect(function()
Clickable.BrickColor = BrickColor.new("Neon orange")
end)
ClickDetector.MouseHoverLeave:Connect(function()
Clickable.BrickColor = BrickColor.new("CGA brown")
end)
ClickDetector.MouseClick:Connect(function()
--run my code
end)
That then will do what I want.
From what I can gather, you then want it to access your Gui, and tell it to show an image in a slot.
You’re gui in game is in a player. You have to get the player name and such to get it’s address. Something like Players.Steve_Speedy.PlayerGui.GuiTest
Don’t use spaces. Capitalise every word.
Now what you can do is a use RemoteEvent:FireClient
to send a message to the Client to update the Gui.
I have an intValue and use 0 as false and 1 as true. I had some trouble with Boolean but maybe that works too. Anyway the value in the gui can then be changed. You can get the player name from the click event too.
So when you click, it gives you the player name who clicked. Then you change the intValue in their gui in their player to include the image. When they open their gui in their player, it reads the intValues and sets up the Gui based on those intValues.
Point being, Your PLAYER Gui sets itself up based on a bunch of values. When you do something in the worldspace to say “Item has been acquired by player” that thing in the worldspace sends a tiny message to the Gui in the Player, saying “This item is Acquired”. Simple as that.
Your click detector is not INSIDE the scoobis PART. Your Part Script isn’t in the PART. Have them in the part that. The actual object. It’s like a school bag. You put all your stuff you need for school INSIDE the bag.
Aditionally, you should have your LocalScript for your Gui as a direct child of the Gui. So “GuiTest.GuiScript” Remember no spaces.
After that you should be pretty set.