Workspace being Dumb

I used a tutorial for this text system thing, and I tried making it so that the person talking’s name would show in the text box. but Roblox Studio decided to be weird. So this happened:


So yeah. I kinda need help.
Btw, Philippians 4 - 13: *I can do all things through Christ which strengtheneth me.

1 Like

Just as a heads up, there are a lot of topics regarding this issue. Please search next time.

Client scripts run before the game is fully loaded, where as server scripts run after the game is fully loaded. Use WaitForChild to get the prompt, as this will wait until the prompt exists before proceeding.

local MATDialogue = workspace:WaitForChild("ProximityPromptMATTalk"):WaitForChild("ProximityPrompt")
3 Likes

Respectfully, you shouldn’t include off-topic content in your posts.

Also, remember to use WaitForChild("Name"). The game was probably not fully loaded.

Edit: Looks like @12345koip beat me to it.

2 Likes

Since things are not getting loaded in workspace it seems that you have StreamingEnabled and are not close enough to those objects for them to be loaded in.
In most cases you should just have prompts be triggered with a server script and send any info you need with a remote event.
If you must have them on the client, you can make sure the prompts are always loaded in by placing them in a model and setting the model’s ModelStreamingMode to Persistent, you should first get the model with :WaitForChild("model") and then you can access the prompts without issues.

2 Likes

you only need 1 wait for child

Not necessarily; the child instances can take longer to load, I’ve seen it before. Better to be safe than sorry, especially for lower end devices which may take longer to load.

2 Likes
1 Like

who puts bible verses in their devforum posts???

Idk where to spread it, so I just decided to put it here.

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