I've had to ask this many times so I am going to be as detailed as possible. I'm making a sell to player gui and this is under the StarterPlayerScripts:
local Player = game.Players.LocalPlayer -- Getting the player
local Mouse = Player:GetMouse() -- Getting the players mouse
Mouse.Button1Down:Connect(function() -- Detecting when player presses the left mouse button
if Mouse.Target.Parent:FindFirstChild("Humanoid") and
Player.TeamColor.Name == ("Dirt brown") then -- Checking if the Mouse is over a player and on a selling team
print(Mouse.Target.Parent.Name) --Check other player's name
local mousetarget = Mouse.Target.Parent
local target = game:GetService("Players")[mousetarget.Name]
target.PlayerGui.StartScreen.Frame.Visible = true --Open other player's Gui
print("Debug") --Debug
end
end)
When someone clicks another player a gui pops up on the other players screen. I've been told to do remote events and more but this is the closest i have gotten. When clicking on another player I am given:
PlayerGui is not a valid member of player --Line 12

1 comment
I can't get the server to connect