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

Can someone help with a Gui Script Problem?

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


It says PlayerGui is not a valid member of Player, Line 43

Even though PlayerGui is a valid member of the players on ROBLOX Can someone please help? All of that is a value and it is also 1 part of it is a Gui

Answer this question