Hello, I honestly don't know whats wrong with this but apparently :Clone() doesn't work or its just because roblox is going insane. (probably not)

local function errormessage(text)
	local hud = game:GetService("ReplicatedStorage").Clone.msg:Clone()
	hud.Text = text
	hud.Parent = game.Players.LocalPlayer.PlayerGui.HUD.errormsg
	hud.manager.Disabled = false
end

errormessage("this is a test ")

this is the problem: local hud = game:GetService("ReplicatedStorage").Clone.msg:Clone()

Am I using " :Clone() " in the wrong way?

5 comments

0

:Clone() isn't wrong. Do you have any errors on your output?

0

Players.rvoided.PlayerGui.interact:9: attempt to index function with 'msg'

0

I changed the name of the folder of which the textlabel is located in but that shouldn't result in an error because I changed the path of which the textlabel is located in

0

if that makes sense

0

okay, so apparently it thought .Clone (which is a folder) was me trying to do :Clone(). It's fixed now