Second time a player’s character is spwaned
it’s not working
-- It's StarterPlayerScript
local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
local Humanoid = Character:WaitForChild("Humanoid")
local Connect
Player.CharacterAdded:Connect(function(NewChar)
if Connect then
Connect:Disconnect()
end
OutSideWater()
Character = NewChar
HumanoidRootPart = NewChar:WaitForChild("HumanoidRootPart")
Connect = HumanoidRootPart.Touched:Connect(function(hit)
if hit.Name == "Water" and not IsFalt then
IsFalt = true
InSideWater()
Humanoid:ChangeState("Physics")
task.wait(3)
Event_LoadCharacter:FireServer()
end
end)
end)
function InSideWater()
Sounds.Ambience:Play()
Sounds.WaterLeave:Play()
for i= 0, 15 do
WaterBlur.Size = i
WaterColor.TintColor = Color3.new(1 - .038 * i, 1 - .027 * i, 1 - .014 * i)
task.wait()
end
end
function OutSideWater()
Sounds.Ambience:Stop()
for i = 15, 0, 1 do
WaterBlur.Size = i
WaterColor.TintColor = Color3.new(1 - .038 * i, 1 - .027 * i, 1 - .014 * i)
task.wait()
end
end