Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

I'm trying to replicate GUIs to other player's screens. I'm unsure of how to problem solve?

I'm trying to recreate replication with GUIs so other player's see other player's 2D space ships. The problem is, I'm unsure how to think of a solution to this kind of problem. It is also a necessity for replication to be secure as an exploiter can turn themselves invisible and ruin the game.

I need basic ideas on how to replicate with GUIs and not full blown solutions so I can better understand. I honestly don't know what to do and can't problem solve yet except if ReplicatedStorage or ReplicatedFirst is gonna help with anything.

Any help is appreciated and happy new years!

3 comments

0

If I understand this text correctly, you could use :Clone() https://developer.roblox.com/en-us/api-reference/function/Instance/Clone

0

How am I gonna do all of this entirely?

0

I understand the Cloning part but it seems too broad to me

1 answer

You are not approaching the problem with the right perspective.

You do not need to replicate the GUI elements. You need to replicate the information about the ships faithfully, and then each client can locally render those ships using GUI.


LocalScripts can call RemoteFunctions on the server, which create/change/move ships. The ships could be represented using objects in the explorer, or they could be tables that can be fetched using RemoteFunctions/RemoteEvents.

Each client requests information about where all the ships are, and then locally creates the necessary gui elements to show them.

2 comments

0

Great explantion. But when should I replicate the information about the ships.. every frame? Players are going to shoot bullets out of their ships and I don't want them to aim at something that is not truthfully there.

0

Also how should I create the ships? I don't want another ship to be made when the same ship exists

This discussion is preserved as it was. New answers, comments, and votes are closed.