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

Can someone tell me whats wrong with it please?

Asked by 8 years ago
local Controls = script.Parent:WaitForChild("Controls")
local Give = Controls:WaitForChild("Give")
local Kick = Controls:WaitForChild("Kick")
local Respawn = Controls:WaitForChild("Respawn")
local GiveLogs = Controls:WaitForChild("GiveLogs")
local GLogsGui = script.Parent:WaitForChild("LogsFrame")
local GLGui = GLogsGui:WaitForChild("LogsIn")
local Radio = Controls:WaitForChild("Radio")
local RadioGui = script.Parent:WaitForChild("RadioFrame")
local TypedF = Controls:WaitForChild("PlayerType")
local TypedPlr = TypedF:WaitForChild("Person")
local Player = game.Players.LocalPlayer
local Gui = game.Workspace.Guis["TGIgui"]
local Giver = script.Parent.Parent.Parent


if _G.Logs == nil then
    _G.Logs = {}
end
local Logs = _G.Logs
local GLOpen = false
local ROpen = false

function GetPlayer(Name)
    for _,v in pairs(game.Players:GetChildren()) do
        if string.len(v.Name) >= string.len(Name) then
            if string.lower(string.sub(v.Name,0,string.len(Name))) == string.lower(Name) then
                return v
            end
        end
    end
    return nil
end

Give.MouseButton1Down:connect(function()
    local Tool = nil
    for _,v in pairs(Player.Character:GetChildren()) do
        if v:IsA("Tool") then
            Tool = v
        end
    end
    local Recipt = GetPlayer(TypedPlr.Text)
    Print(Recipt)
    Recipt.PlayerGui.Give.Value = Giver
    local Accept = Recipt.PlayerGui.YesNo
    Gui:Clone().Parent = Recipt.PlayerGui
    if Recipt ~= nil and Tool ~= nil and Accept.Value == true then
        script.Parent.Parent.Parent.leaderstats.Points.Value = script.Parent.Parent.Parent.leaderstats.Points.Value+1
        Tool.Parent = Recipt.Backpack
        table.insert(Logs, Player.Name.." gave a menu item to "..Recipt.Name)
    end
end)

PlayerGui isn't a valid member of Player line 43

Can someone please help me because all Players on ROBLOX have a PlayerGui but its erroring saying that they don't have a PlayerGui

0
You need to provide a lot more information...What is this script supposed to do? Is this a LocalScript? Where is this script? What do you want it to do? What is it doing? lightpower26 399 — 8y
0
The script is in a Gui DeveloperAtWork 14 — 8y

Answer this question