Hello, I’m AE_TG, and I am not good at GUIs. I made a script that would clone a GUI on the client’s side when a part was right-clicked, and that GUI would be moved to StarterGUI from ReplicatedStorage, and Enabled would become true. This is my server-side script:
clickD.RightMouseClick:Connect(function(plr)
local rs = game:GetService("ReplicatedStorage")
rs.GUIspawn:FireClient(plr, root) -- this is the HumanoidRootPart, which contains all of the attributes necessary for my script
end)
This is my LocalScript in StarterGUI:
local rs = game:GetService("ReplicatedStorage")
rs.GUIspawn.OnClientEvent:Connect(function(root)
local desc = rs:WaitForChild("RCGUI"):Clone()
local rDesc = desc.Stats
rDesc.Description.Text = root:GetAttribute("Description")
rDesc.Electrons.Text = root:GetAttribute("ElectronNumber")
rDesc.SubstanceName.Text = root:GetAttribute("Name")
desc.Parent = game:GetService("StarterGui")
desc.Enabled = true
print("Event run!")
end)
My organization of these instances:
HumanoidRootPart when all the attributes are there:
It does print Event run! but I don’t see the GUI. It is in StarterGUI and is enabled, I just can’t see it.
I can post more pictures if anyone wants. Please help!