Local/script (why do I have to reset to update the UI)

local script inside starterplayerscripts

local RS = game:GetService("ReplicatedStorage")
local Plrs = game:GetService("Players")

local RE = RS:WaitForChild("FirstQuest")
local Plr = Plrs.LocalPlayer
local Pat = workspace:WaitForChild("HalloweenDropper").StuffAtHalloweenLobby.HalloweenDropperDone

Pat.Touched:Connect(function(Hit)
	local Target = Hit.Parent
	local TouchedPlr = Plrs:GetPlayerFromCharacter(Target)

	if TouchedPlr and TouchedPlr == Plr then
		RE:FireServer() -- This will send a request from the client to the server 
	end
end)````

````lua
local RS = game:GetService("ReplicatedStorage")

local RE = RS:WaitForChild("FirstQuest")

local gui1 = game.StarterGui.HalloweenEventQuest.FrameQuest1["step 1"]

local gui2 = game.StarterGui.HalloweenEventQuest.FrameQuest1.nextQust1

RE.OnServerEvent:Connect(function(Plr) -- The Player that fired on the client will always be the first argument

gui1.Text = "First Step Done!"

gui2.Visible = true

end)

script inside ServerScriptService

robloxapp-20221102-0741215.wmv (1.1 MB)

You can’t mess with a Screen Gui Text within a Normal script (I believe), And why it is giving that text when you reset is because you have the ResetOnSpawn Properties on the ScreenGui and the server corrects that. Possibly try connecting a Remote event to have the same/similar effect happeneing on a Client Event.

the Gui too dont change sometimes at all when i try to

You could also have it with a remote function and do something like this:

Local script edits starting at line “RE:FireServer() – This will send a request from the client to the server”

local RemoteFunctionText = RE:InvokeServer()

repeat wait() until  RemoteFunctionText ~= nil 
local TextLabel = "Find the TextLabel locally"
TextLabel.Text = RemoteFunctionText

ServerCode

local RemoteFunction = "Location of Remote Function"
RemoteFunction.OnServerInvoke = function()
Text = "Whatever You Want"
return Text

Again, this is with a Remote function NOT a remote event!

I didn’t rly understand what u just do, I just need when i touch part the gui will change

let me tell you about startergui first, starter gui clones all its content to a new player joining. so if you changed the gui on StarterGui, it will clone to your PlayerGui again when u spawn. if you want to change it live, then configure the ui properties from the client side and use LocalPlayer.PlayerGui

1 Like

AH I see the possible issue. Do this

RE.OnServerEvent:Connect(function(Plr) -- The Player that fired on the client will always be the first argument

local gui1 = Plr.PlayerGui.HalloweenEventQuest.FrameQuest1["step 1"]

local gui2 = Plr.PlayerGui.HalloweenEventQuest.FrameQuest1.nextQust1

gui1.Text = "First Step Done!"

gui2.Visible = true

end)

Instead of that… If that doesn’t work, try from a local side only… I wasn’t even looking at the Starter Gui, thank you @p49p0 !

2 Likes

well for now its work thx
if its will be problem at future I will use his tip p49p0

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