I have done Debugging and the code is running with no error and the GUI's are being stored in the right place. Is there a certain property of the UI's i should change?
Code is as follows (There is nothing in the fire all clients side):
local rep = game.ReplicatedStorage.RemoteEvent rep.OnClientEvent:Connect(function() local GUI = Instance.new("ScreenGui") local Text = Instance.new("TextBox") Text.Text = "Fart" GUI.Parent = game.StarterGui Text.Parent = GUI wait(2) print(Text.Parent.Parent) end)
[Solved] I needed to give the text box a size parameter with Udim2
LocalScript that is needed to start the Event can't reach ReplicatedStorage, try moving Event into the workspace, script into event and instead of putting Gui in the StarterGui put it in PlayerGui to prevent giving player same gui a few times.
Script(inside event):
local rep = game.ReplicatedStorage.RemoteEvent rep.OnClientEvent:Connect(function(plr) local GUI = Instance.new("ScreenGui") local Text = Instance.new("TextBox") Text.Text = "Fart" GUI.Parent = game.Players.plr.PlayerGui Text.Parent = GUI end)
LocalScript(StarterPlayer > StarterPlayerScript/StarterCharacterScript):
workspace.RemoteEvent:FireServer()