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

Local Script not changing text but running and working!?

Asked by 5 years ago
Edited 5 years ago

So I have a problem. It's in the local script. The problem is that it doesn't change its text, but it makes the gui enabled. Plz help!!??

[NOTE:NO ERRORS IN OUTPUT]

Script:

local games = game.Workspace.Games

local event = game:GetService('ReplicatedStorage'):FindFirstChild('FindHost')



games.ChildAdded:Connect(function(child)

local host

for _, plr in pairs(game.Players:GetPlayers()) do

if child.Name == plr.Name then

    host = plr

    break

end

end

if host~= nil then

child.Players.ChildAdded:Connect(function(newchild)

local newplr = game.Players:WaitForChild(newchild.Name)

if newplr then

    print(child.Name)

    event:FireClient(newplr,child,newplr)

        end

    end)

end


local games = game.Workspace.Games



local event = game:GetService('ReplicatedStorage'):FindFirstChild('FindHost')



games.ChildAdded:Connect(function(child)

local host

for _, plr in pairs(game.Players:GetPlayers()) do

if child.Name == plr.Name then

    host = plr

    break

    end

end

if host~= nil then

child.Players.ChildAdded:Connect(function(newchild)

local newplr = game.Players:WaitForChild(newchild.Name)

if newplr then

        print(child.Name)

        event:FireClient(newplr,child,newplr)

        end

    end)

end
end)

Local Script:

local event =                    game:GetService('ReplicatedStorage'):WaitForChild('FindHost')



local plr = game.Players.LocalPlayer



event.OnClientEvent:Connect(function(folder,newplr)

local hostname = folder.Name

local gui = newplr.PlayerGui.VisitorParty

local frame = gui.VisitorFrame

local misc = frame.Misc

print(misc.Text)

misc.Text = 'You are currently in' ..hostname..' s lobby.'

gui.Enabled = true

end)

Can someone help me?

0
cant u just use game.Players.LocalPlayer EXpodo1234ALT 18 — 5y

Answer this question