When a player touches the part the GUI (fadeScreen) is supposed to only change for the player that touched the part, but it changes for all players.
This is a local script inside StarterGui
local player = game.Players.LocalPlayer
local playergui = player:WaitForChild("PlayerGui")
local fadeScreen = playergui.Travel.FadeScreen
place = CFrame.new(206.25, -159.5, -1833)
function fadeIn(GUI)
fadeScreen.Visible = true
fadeScreen.BackgroundTransparency = 1
for i = 1, 150 do
wait(0.01)
fadeScreen.BackgroundTransparency = fadeScreen.BackgroundTransparency - 0.01
end
end
game.Workspace.Part1.Touched:Connect(function(hit)
if debounce == false then return end
debounce = false
if hit then
if hit.Parent:FindFirstChild('Humanoid') and game.Players:FindFirstChild(hit.Parent.Name) then
local plr = game.Players:FindFirstChild(hit.Parent.Name)
fadeIn()
plr.Character.HumanoidRootPart.CFrame = place
end
end
wait(10)
debounce = true
end)

1 comment
Works like a charm! Thank you!