Set the parent of a Screen GUI

I tested it with a Server Script using player added and it worked. Should I not do it?

It is advised, even though you can, not to. My prediction is that you want to open something when a player touches a part, on which you can use this script located in the startergui:

local Part = --the part touched
local GUI = --the gui

Part.Touched:Connect(function(hit)
    if hit.Parent:FindFirstChild("Humanoid") then
        GUI.Parent = game.Players.LocalPlayer:Waitforchild("StarterGui")
    end
end

all GUI related things should only be done on the client, no server scripts, at all, no matter what.

You could as long as you know who the player is

local player = -- however you know 
local ui = blahblah:Clone()
ui.Parent = player:WaitForChild(“PlayerGui”)