Frame not appearing in plugin widget [HELP]

hi it’s me again

in my chat plugin theres a scrollingframe which contains the messages sent

i made a frame which serves as the base for the messages, and when a message is sent, i clone the frame, change it’s name, make it visible, and then parent it to the scrollingframe

this is what it looks like in the explorer (msgframe is the scrollingframe that contains the messages, and msgbase is the base for the messages)
wowieee

i print the name, parent name and visible property when a message is sent and all is normal, but it just doesn’t appear

code:

local function displaymsg(plrname, msgstr)

	local msg = msgbase:Clone()
	msg.Name = "msg"..tostring(plrname)
	local mtf = msg:FindFirstChild("textframe")
	local mpfp = msg:FindFirstChild("pfp")
	local mtext = mtf:FindFirstChild("text")
	local mname = mtf:FindFirstChild("name")

	llo+=1
	msg.LayoutOrder = llo

	mtext.Text = tostring(msgstr)
	mname.Text = tostring(plrname)
	
	msg.Parent = msgframe
	print(tostring(msg.Parent.Name))
	msg.Visible = true
	print(tostring(msg.Visible))
	
end

local function receivemsg(msg:Folder)
	if msg then
		if string.find(tostring(msg.Name), "msg") then
			local sender = msg:FindFirstChild("sender")
			local message = msg:FindFirstChild("message")
			displaymsg(tostring(sender.Value),tostring(message.Value))
			coroutine.wrap(function()
				task.wait(0.1)
				msg:Destroy()
			end)()
		end
	end
end


local function sendmsg(sender, message)

	if not loatccfolder then return end

	local newmsgfolder = Instance.new("Folder")
	newmsgfolder.Name = "msg"..tostring(sender)

	local senderval = Instance.new("StringValue")
	senderval.Name = "sender"
	local messageval = Instance.new("StringValue")
	messageval.Name = "message"

	senderval.Value = tostring(sender)
	messageval.Value = tostring(message)

	senderval.Parent = newmsgfolder
	messageval.Parent = newmsgfolder

	newmsgfolder.Parent = loatccfolder

end

i have tested it in actual guis, and it works fine, but just not in plugins for some reason, and yes i am using the main plugin script to do it, since it wouldn’t work any other way

there are no errors, and i have checked if the code works by printing, everything should be fine, and the frame definitely exists, but just doesn’t appear

can you show the script? I can’t help you

sorry i completely forgot to post the code, my mind was like “you’re definitely missing something” lol

local function displaymsg(plrname, msgstr)

	local msg = msgbase:Clone()
	msg.Name = "msg"..tostring(plrname)
	local mtf = msg:FindFirstChild("textframe")
	local mpfp = msg:FindFirstChild("pfp")
	local mtext = mtf:FindFirstChild("text")
	local mname = mtf:FindFirstChild("name")

	llo+=1
	msg.LayoutOrder = llo

	mtext.Text = tostring(msgstr)
	mname.Text = tostring(plrname)
	
	msg.Parent = msgframe
	print(tostring(msg.Parent.Name))
	msg.Visible = true
	print(tostring(msg.Visible))
	
end

local function receivemsg(msg:Folder)
	if msg then
		if string.find(tostring(msg.Name), "msg") then
			local sender = msg:FindFirstChild("sender")
			local message = msg:FindFirstChild("message")
			displaymsg(tostring(sender.Value),tostring(message.Value))
			coroutine.wrap(function()
				task.wait(0.1)
				msg:Destroy()
			end)()
		end
	end
end


local function sendmsg(sender, message)

	if not loatccfolder then return end

	local newmsgfolder = Instance.new("Folder")
	newmsgfolder.Name = "msg"..tostring(sender)

	local senderval = Instance.new("StringValue")
	senderval.Name = "sender"
	local messageval = Instance.new("StringValue")
	messageval.Name = "message"

	senderval.Value = tostring(sender)
	messageval.Value = tostring(message)

	senderval.Parent = newmsgfolder
	messageval.Parent = newmsgfolder

	newmsgfolder.Parent = loatccfolder

end

these are the functions that do the work, yes i’ve checked them using prints, all of them work fine, and the frame is being cloned it just doesn’t show fsr

bump
i’m genuinely confused on what’s happening
and yes, everything is being done on the main script i recently learned it only works there

ye i’ve tried basically everything, might just give up on this plugin, i still would appreciate any help though

this entire time it was just cause of the zindex being too low i hate myself lol

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.