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

Gui does not update when button is clicked?

Asked by 6 years ago
Edited 6 years ago

So i'm basically making a call gui for people to use when they need it but when I try to send the "call" nothing shows up on the dispatch screen?

Here is the script.

local unit = script.Parent.unit
local send = script.Parent.send
local plr = game.Players.LocalPlayer
local plrGui = plr:WaitForChild("PlayerGui")
local desc = script.Parent.desc
local location2 = script.Parent.location
unit.MouseButton1Click:connect(function()
    send.Unit_Type.Value = 1
end)

send.MouseButton1Click:connect(function(player)

    if plr.TeamColor == "New yeller" then
        if send.Unit_Type.Value == 1 then
        plrGui.CallGui.Frame.Type.Text = "Units: Police"
        local descother = plrGui.CallGui.Frame.Desc
        descother.Text = desc.Text
        local loco = plrGui.CallGui.Frame.location
        loco.Text = location2.Text
        end




    end
end) 

It's all in a local script inside the gui. There are no errors in the output so I don't know whats wrong? Also how would I send this message to only gui's on specific teams?

0
if plr.TeamColor == BrickColor.new(“New yeller”) then User#19524 175 — 6y
0
lol yeah change New yeller to New Yeller LukeGabrieI 73 — 6y

Answer this question