I just updated the script to utilise :GetPropertyChangedSignal
but now it’s not playing at all-
@snowingwings220 this is a local script but there is also a serverscript changing the value of status.
status:GetPropertyChangedSignal("Value"):Connect(function()
if status.Value == "Caves" then
if status.Value == "Caves" then
for i = 1,5 do
mapname.Text = string.sub("Caves",1,i)
task.wait(0.1)
end
for i = 1,26 do
creators.Text = string.sub("Created by DevInfinityPlus",1,i)
task.wait(0.1)
end
creators.Text = ""
mapname.Text = ""
elseif status.Value == "Harbour" then
for i = 1,7 do
mapname.Text = string.sub("Harbour",1,i)
task.wait(0.1)
end
for i = 1,26 do
creators.Text = string.sub("Created by DevInfinityPlus",1,i)
task.wait(0.1)
end
creators.Text = ""
mapname.Text = ""
elseif status.Value == "Magical Forest" then
for i = 1,14 do
mapname.Text = string.sub("Magical Forest",1,i)
task.wait(0.1)
end
for i = 1,26 do
creators.Text = string.sub("Created by DevInfinityPlus",1,i)
task.wait(0.1)
end
creators.Text = ""
mapname.Text = ""
end
end
end)
It just literally doesn’t say the map at all.
ServerScript if needed
local lobby = game.Workspace.Lobby
local maps = game.ReplicatedStorage.Maps:GetChildren()
local status = game.ReplicatedStorage.Status
local maptextbool = game.ReplicatedStorage.MapTextDispayBool
local runService = game:GetService("RunService")
maptextbool = false
function StartCutscene(map)
-- Trigger cutscene on the clients
game.ReplicatedStorage.StartCutscene:FireAllClients(map)
-- Wait for the cutscene to finish
local cutsceneDuration = 10
wait(cutsceneDuration)
-- Teleport players
for _, player in ipairs(game.Players:GetPlayers()) do
local character = player.Character
if character then
local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
if humanoidRootPart then
if map.Name == "Caves" then
humanoidRootPart.CFrame = game.Workspace.CaveSLs:getChildren()[math.random(1,#game.Workspace.CaveSLs:GetChildren())].CFrame
end
if map.Name == "Harbour" then
humanoidRootPart.CFrame = game.Workspace.HarbourSLs:getChildren()[math.random(1,#game.Workspace.HarbourSLs:GetChildren())].CFrame
end
if map.Name == "Magical Forest" then
humanoidRootPart.CFrame = game.Workspace.ForestSLs:getChildren()[math.random(1,#game.Workspace.ForestSLs:GetChildren())].CFrame
end
end
end
end
-- Gameplay countdown
for i = 30, 0, -1 do
status.Value = i
wait(1)
end
-- Return to lobby
for _, player in ipairs(game.Players:GetPlayers()) do
local character = player.Character
if character then
local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
if humanoidRootPart then
humanoidRootPart.CFrame = lobby.TeleportPoint.CFrame
end
end
end
-- Cleanup
map:Destroy()
game.Workspace.SpawnLocationLobby.Enabled = true
for i,v in pairs(game.Workspace.CaveSLs:GetChildren()) do
if v:IsA("SpawnLocation") then
v.Enabled = false
end
end
for i,v in pairs(game.Workspace.ForestSLs:GetChildren()) do
if v:IsA("SpawnLocation") then
v.Enabled = false
end
end
for i,v in pairs(game.Workspace.HarbourSLs:GetChildren()) do
if v:IsA("SpawnLocation") then
v.Enabled = false
end
end
end
while true do
-- Intermission countdown
for i = 20, 0, -1 do
status.Value = i .. " seconds of intermission..."
wait(1)
if i == 0 then
game.Workspace.SpawnLocationLobby.Enabled = false
end
end
-- Map selection
local chosenMap = maps[math.random(1, #maps)]
local clonedMap = chosenMap:Clone()
clonedMap.Parent = game.Workspace
status.Value = chosenMap.Name
maptextbool = true
print(status.Value)
if clonedMap.Name == "Caves" then
for i,v in pairs(game.Workspace.CaveSLs:GetChildren()) do
if v:IsA("SpawnLocation") then
v.Enabled = true
end
end
elseif clonedMap.Name == "Harbour" then
for i,v in pairs(game.Workspace.HarbourSLs:GetChildren()) do
if v:IsA("SpawnLocation") then
v.Enabled = true
end
end
elseif clonedMap.Name == "Magical Forest" then
for i,v in pairs(game.Workspace.ForestSLs:GetChildren()) do
if v:IsA("SpawnLocation") then
v.Enabled = true
end
end
end
-- Start the cutscene on the server
StartCutscene(clonedMap)
end