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

My text for my gui is not showing with FE enabled?

im pretty new to scripting and im learning fe right now and im making a crappy game for practice

local script

local rs = game:GetService("ReplicatedStorage")
local event = rs.events.RemoteEvent
local bad = game.ReplicatedStorage.events:WaitForChild("RemoteEvent")
local sp = script.Parent
local int = sp:WaitForChild("IntValue")
local hum = game.Players.LocalPlayer.Character.Humanoid
local tex = game.StarterGui.ScreenGui:WaitForChild("TextLabel")

 function goo()
	tex.Text = "Faith in Humanity = "..int.Value
end

bad.OnClientEvent:Connect(goo)

script

game.Players.PlayerAdded:Connect(function(gof)
	game.ReplicatedStorage.events.RemoteEvent:FireClient()
end)

2 answers

###This is because you didn't specify the client to fire to.

game:GetService("Players").PlayerAdded:Connect(function(gof)
    game:GetService("ReplicatedStorage").events.RemoteEvent:FireClient(gof)
end)

2 comments

0

Line 2 got cot uff. It's FireClient(gof)

0

still doesnt work :(

As stated above by incapaz, you didn't fire the event to the specific client. Therefore you need to add the client in the parameters of :FireClient(), you used "gof" as your client so it should be:

game:GetService("Players").PlayerAdded:Connect(function(gof)
	game:GetService("ReplicatedStorage").events.RemoteEvent:FireClient(gof)
end)

Additionally in the local script on Line 7 you set the directory of the TextLabel to:

game.StarterGui.ScreenGui:WaitForChild("TextLabel")

StarterGui is cloned to the player when they respawn and is not the actual gui's that the player is seeing. You should instead use PlayerGui. It is located inside the player in game:GetService("Players"):

game:GetService("Players").LocalPlayer.PlayerGui.ScreenGui:WaitForChild("TextLabel")

Everything should work after this.

1 comment

0

Still doesnt work

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