The sound doesnt play even when i use :Play()
here is the script:
(line 38)
local Players = game:GetService("Players")
local part = script.Parent
local function Touched(Object)
local Player = game.Players:GetPlayerFromCharacter(Object.Parent)
if not AlreadyTouched and Player then
AlreadyTouched = true
print("Good")
local name = Player.Name
print(name)
local Dialog = game.Players:GetPlayerFromCharacter(Object.Parent).PlayerGui.Dialog.Dialog
local Person = game.Players:GetPlayerFromCharacter(Object.Parent).PlayerGui.Dialog.Person
local gui = game.Players:GetPlayerFromCharacter(Object.Parent).PlayerGui
if Object.Parent:FindFirstChild("Humanoid") then
wait(2)
game.Players:GetPlayerFromCharacter(Object.Parent).PlayerGui.Dialog.Dialog.Text = "Are you guys ready for the trip?"
game.Players:GetPlayerFromCharacter(Object.Parent).PlayerGui.Dialog.Person.Text = "dad"
game.Players:GetPlayerFromCharacter(Object.Parent).PlayerGui.Dialog.Dialog.Visible = true
game.Players:GetPlayerFromCharacter(Object.Parent).PlayerGui.Dialog.Person.Visible = true
wait(4)
Person.Visible = false
Dialog.Visible = false
Person.Text = "Mom"
Dialog.Text = "*slowly dies*"
wait(1)
Person.Visible = true
Dialog.Visible = true
wait(3)
Person.Visible = false
Dialog.Visible = false
wait(2)
game.StarterGui.TaxiSound:Play()
wait(2.5)
Person.Text = "Dad"
Dialog.Text = "Oh i didnt notice the taxi, lets go!"
Person.Visible = true
Dialog.Visible = true
wait(2)
Person.Visible = false
Dialog.Visible = false
wait(1)
print("HEY")
for i = 1,0,-0.1 do
gui.BlackScreen.Frame.BackgroundTransparency = i
wait(0.1)
end
game.Workspace.Value1.Value = (1)
local person = game.Workspace:FindFirstChild(name)
person.HumanoidRootPart.CFrame = CFrame.new(Vector3.new(-11.85, 0.511, -105.47))
for i = 0,1, 0.1 do
gui.BlackScreen.Frame.BackgroundTransparency = i
wait(0.1)
end
end
end
end
script.Parent.Touched:Connect(Touched)```