I made a cool fade in, fade out script in roblox studio when you enter this door
Sorry for my bad grammar, I'm from Denmark,
It's a local script
It fades out for everyone somehow? i don't have a clue why.
local Enter = game.Workspace.Enter
local Frame = script.Parent.Frame
local Debounce = false
local LabDoor = game.Workspace.ScientificResearch.HeyPart
local LabDoorA = game.Workspace.ScientificResearch.LabDoor
Enter.Touched:Connect(function(hit)
local Humanoid = hit.Parent:FindFirstChild("Humanoid")
if Humanoid and not Debounce then
Debounce = true
Frame.Visible = true
Humanoid.WalkSpeed = 0
Humanoid.JumpPower = 0
for i = 1,0,-0.01 do
wait()
Frame.BackgroundTransparency = i
end
wait(3)
Debounce = false
hit.Parent:FindFirstChild("HumanoidRootPart").CFrame = LabDoor.CFrame * CFrame.new(0, 6, 0)
wait(2)
for a = 0,1,.01 do
wait()
Frame.BackgroundTransparency = a
end
Humanoid.WalkSpeed = 16
Humanoid.JumpPower = 50
end
end)
local Debounce = false
local BackHome = game.Workspace.BackHome
LabDoorA.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local Humanoid = hit.Parent.Humanoid
if Humanoid then
Humanoid.WalkSpeed = 0
Humanoid.JumpPower = 0
for i = 1,0,-0.01 do
wait()
Frame.BackgroundTransparency = i
end
hit.Parent:FindFirstChild("HumanoidRootPart").CFrame = BackHome.CFrame * CFrame.new(0, 6, 0)
wait(2)
for a = 0,1,.01 do
wait()
Frame.BackgroundTransparency = a
end
Humanoid.WalkSpeed = 16
Humanoid.JumpPower = 50
end
end
end)

7 comments
Is this on a localscript?
Yep
What question are you really asking?
It's making the gui visible for everyone when they enter
You should make sure the person who touched the EnterBrick is the localplayer. if Hit.Parent.Name == game.Players.LocalPlayer.Name then
ah, i see. Let me try :)
i-. FINE YOU ANSWERED IT. All jokes aside thank you for answering :)