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

Is it a local or server/normal script that can change the text of a gui in startergui?

Is it a local or server/normal script that can change the text of a gui in startergui?

8 comments

1

both of them can, it depends on what result you want

0

On a playergui

1

local scripts will only change for the local player, and normal scripts will change for all players

0

so a countdown before the wave starts

1

playergui? Both of them can, but I would aways use LocalScript, as some guis aren't replicated to server

0

Oh thanks its a 1 man game anyway, can the script be anywhere or have to be somewhere spercific

1

i'll make an answer for this question, give me a moment...

0

thx

1 answer

✓ Accepted answer

Hello, FluffySheep46209!

Both scripts can change anything on your game, the only thing that changes is if the action will be replicated or not.

Local Scripts make changes that only the LocalPlayer can see/interact, while normal scripts change for everyone.

LocalScripts are commonly used with guis because they don't need to be replicated to all players.

so you can use a RemoteEvent and a local script to do that. [using :FireAllClients() on server]

Something like that:

event.OnClientEvent:Connect(function()
	script.Parent.Text = "30"
	--- bla bla bla rest of the code...
end)

this script would change the text once the event is fired

NOTE: The script above will not work, as i'm using a invalid reference to an object(event)

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