Hey all! So, my script works fine, except for line 20, when I attempt to access "Victim"'s PlayerGui. "Victim" is the Player of the character I click with my mouse. It keeps saying "PlayerGui" isn't a valid member of "Player", and whenever I put WaitForChild, or repeat wait(), it still says the same error. Any tips? Thanks!
repeat wait() until script.Parent.Parent.Name~="Backpack" wait() tool = script.Parent Citation = game.Lighting.CitationsDB Player = game.Players.LocalPlayer tool.Equipped:connect(function(mouse) if not Player:findFirstChild("PlayerGui") then return end if Player.PlayerGui:findFirstChild("CitationsDB") then return end mouse.Button1Down:connect(function() if mouse.Target then if game.Players:GetPlayerFromCharacter(mouse.Target.Parent) then local Victim = game.Players:GetPlayerFromCharacter(mouse.Target.Parent) Citation:clone().Parent = Player.PlayerGui local GUI = Player.PlayerGui.CitationsDB GUI.CitationsDB:TweenPosition(UDim2.new(0.5,-160,0.5,-100),'Out','Quad',0.35) GUI.Citee.Value = Victim.Name GUI.CitationsDB.Citation.Username.Text = "Username: "..Victim.Name Victim.PlayerGui.ScreenGui:Destroy() end end end) end)
Just use game.StarterGui:SetCoreGuiEnabled and disable the cores using this code.
game.StarterGui:SetCoreGuiEnabled("Chat","PlayerList",Health") --It might not work with the multi-syntax. -- Just do it one by one.