Cloning doesn’t automatically parent the cloned instance, just parent chatMessage
to where ever you want it to be.
local chatMessage = storage.ChatMessage:Clone()
chatMessage.Author.Name.Badge.Visible = true
chatMessage.Parent = --parent it here
Cloning doesn’t automatically parent the cloned instance, just parent chatMessage
to where ever you want it to be.
local chatMessage = storage.ChatMessage:Clone()
chatMessage.Author.Name.Badge.Visible = true
chatMessage.Parent = --parent it here
I know that, it is just that the script can’t find any of the children inside it. If I remove everything else than cloning and parenting, then it clones fully. When I try to change anything inside it with the script, it fails.
local chatMessage = storage.ChatMessage;
if chatMessage:IsA(Instance type) then
chatMessage:Clone(); chatMessage.Parent = ParentLocation;
end
You could run it in a pcall but thats not really necessary
That didn’t work sadly, maybe it is an engine issue? Anything else I clone works, its just that specific message template wont clone
Edit: I tried remaking the message template and it still didn’t work
ChatMessage is a frame, correct?
Yes, chatMessage is a frame. Also when I cloned it and put it in to workspace, it DOES have all it’s children meaning the script just can’t see the children.
Where are you replicating it from?
Not really sure what you mean by that, but here is the entire setup:
ClientChatScript is the localscript that has the code that is the issue.
Edit: Heres the chatMessage children if you want to know what is inside it too
Honestly from what I can understand by testing its problems with studio, classes are not registering under parents which is causing errors in the code.
By the way, this isn’t a problem just in studio. It also is an issue on the client
WAIT A MINUTE WHAT IS THIS
I know voice chat is coming but I didn’t think it was already starting to be put into releases and stuff
When you run studio test, you are testing on the client. When you test with “Run” you are testing on the server. By the looks of it roblox is dealing with some issues that are occurring across the fourms.
This is a super long thread so I’m not going to read it. Here is the problem with the code in the topic:
chatMessage.Author.Name.Badge.Visible = true
is trying to do the same thing as "Author".Badge.Visible = true
.chatMessage.Author:FindFirstChild("Name").Badge.Visible = true
).Random Tip For #help-and-feedback:scripting-support Usage:
That was so simple… thank you so much.
Thanks everyone here lol this took like 5 hours
Oops, I did not see that. ;-;
Good luck on your custom chat system.