For some reason, when I write
if underfoot then
tween(primaryPart, {CFrame = underfoot.CFrame}, 0.2)
if underfoot == "Exit" then
if dialogue:PromptYesOrNo("Do you want to go to the next floor?", true) then
local remotesFolder = replicatedStorage:WaitForChild("Remotes")
local dungeonLevel = remotesFolder:WaitForChild("DungeonLevel")
dungeonLevel:Fire(true)
end
end
end
Nothing happens, I tried printing underfoot
and it returns "Exit"
, any ideas why this is happening?