Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 4 years ago

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

1
both of them can, it depends on what result you want Leamir 3138 — 4y
0
On a playergui FluffySheep46209 369 — 4y
1
local scripts will only change for the local player, and normal scripts will change for all players Leamir 3138 — 4y
0
so a countdown before the wave starts FluffySheep46209 369 — 4y
View all comments (4 more)
1
playergui? Both of them can, but I would aways use LocalScript, as some guis aren't replicated to server Leamir 3138 — 4y
0
Oh thanks its a 1 man game anyway, can the script be anywhere or have to be somewhere spercific FluffySheep46209 369 — 4y
1
i'll make an answer for this question, give me a moment... Leamir 3138 — 4y
0
thx FluffySheep46209 369 — 4y

1 answer

Log in to vote
3
Answered by
Leamir 3138 Moderation Voter Community Moderator
4 years ago
Edited 4 years ago

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)

Ad

Answer this question