Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

[fixed] " attempt to index function with 'msg' "?

Asked by
Hydrogyn 155
4 years ago
Edited 4 years ago

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?

0
:Clone() isn't wrong. Do you have any errors on your output? NiniBlackJackQc 1562 — 4y
0
Players.rvoided.PlayerGui.interact:9: attempt to index function with 'msg' Hydrogyn 155 — 4y
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 Hydrogyn 155 — 4y
0
if that makes sense Hydrogyn 155 — 4y
0
okay, so apparently it thought .Clone (which is a folder) was me trying to do :Clone(). It's fixed now Hydrogyn 155 — 4y

Answer this question