For some reason, when a player touches the part that needs to be touched, the gui enables for everyone instead of only the player who touched the part, i hope anyone can help
Script (Inside Of StarterGUI and is a LocalScript) :
local player = game.Players.LocalPlayer
local playerGUI = player.PlayerGui
local frame = playerGUI.BlackScreen.ActualBlackScreen
local BlackScreen = playerGUI.BlackScreen
local char = player.Character
local HumanoidRootPart = char:FindFirstChild("HumanoidRootPart")
local playerGUI = player.PlayerGui
game.Workspace.PartQuiTeFaitTP.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
playerGUI.TpConfirmGUI.Enabled =true
end
end)
Make RemoteEvent Called ShowGui in ReplicatedStorage.
Script in part:
local Part = script.Parent
local DB = true
Part.Touched:Connect(function(hit)
local hum = hit.Parent:FindFirstChild("Humanoid")
if hum and DB then
DB = false
game.ReplicatedStorage.ShowGui:FireAllClient()
wait()
DB = true
end
end)