GUI = game.ReplicatedStorage.Radar.radar local Part = script.Parent Part.Touched:connect(function(HIT) local H = HIT.Parent:FindFirstChild("Humanoid") if H then local Player = game.Players:GetPlayerFromCharacter(HIT.Parent) if Player == game.Players.LocalPlayer then game.PlayerGui.Radar.radar.Visible = true -- Radar is a screen GUI -- radar is a frame end end end)?
Okay, I'm pretty sure this will work, but fix your GetPlayerFromCharacter() to look like this:
local Player = game.Players:GetPlayerFromCharacter(HIT.Parent.Name)
script.Parent.Touched:connect(function(hit) if hit.Parent.Humanoid then local Character = hit.Parent local Player = game.Players:GetPlayerFromCharacter(Character) local PlayerGui = Player.PlayerGui local Gui = PlayerGui.Radar local Frame = Gui.radar Frame.Visible = true end end
Hope this helps
If your trying to make a Frame visible then just access the PlayerGui;
Make sure this is a script, not local script
local part = script.Parent part.Touched:Connect(function(H) local pg = H.Parent:WaitForChild("PlayerGui") local frame = pg:WaitForChild("Radar").radar wait() radar.Visible = true end)
You don't need some stuff,
if this helped please accept answer :D