Hey everyone, I’m very new to roblox scripting.
I found a model which lets users mapvote and teleport to a location if enough people voted for it. The only thing I need left for this system to completely work is for people to be able to go teleport back to the lobby when a specific event has taken place. Do you know how I can script ‘When X Event Happens, Teleport To Y’?
local Players = game:GetService("Players")
event:Connect(function()
for i,v in pairs(Players:GetPlayers()) do
local humrootpart = v.Character:FindFirstChild("HumanoidRootPart")
humrootpart.CFrame = CFrame.new(0, 0, 0)
end)
1 Like