Ad
Still have questions? Join our Discord server and get real time help.
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 5 months 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 2963 — 5mo
0
On a playergui FluffySheep46209 369 — 5mo
1
local scripts will only change for the local player, and normal scripts will change for all players Leamir 2963 — 5mo
0
so a countdown before the wave starts FluffySheep46209 369 — 5mo
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 2963 — 5mo
0
Oh thanks its a 1 man game anyway, can the script be anywhere or have to be somewhere spercific FluffySheep46209 369 — 5mo
1
i'll make an answer for this question, give me a moment... Leamir 2963 — 5mo
0
thx FluffySheep46209 369 — 5mo

1 answer

Log in to vote
3
Answered by
Leamir 2963 Moderation Voter Community Moderator
5 months ago
Edited 5 months 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