Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How can i make this script clone a gui directly to the player with FE?

I'm just making a .exe horror game on roblox, and i'm not really good with any sorts of events for FE and localscripts. I'm not requesting anything, but only how i can make it clone the gui with RemoteEvents/Functions. Like i said i don't want to request anything else, hopefully this is understandable.

local CD = script.Parent.ClickDetector

CD.MouseClick:Connect(function()
	local plr = game:GetService("Players").LocalPlayer
	script.Parent.NoobieGui:Clone().Parent = plr.PlayerGui
end)

1 answer

✓ Accepted answer

It's pretty simple because the server can have access to the client! MouseClick return the player when have clicked. So your script is now like that:

local CD = script.Parent.ClickDetector

CD.MouseClick:Connect(function(plr)
    script.Parent.NoobieGui:Clone().Parent = plr.PlayerGui
end)

Use script. Not LocalScript

2 comments

0

^ Thanks, sometimes i can be pretty darn stupid.

0

you're not stupid you did just not know:)

This discussion is preserved as it was. New answers, comments, and votes are closed.