I have been trying this out for a hour, I'm quite new to scripting and I have been using this site for a while, looking at posts for reference, tho I never made a account till now. I don't have anything of use of a script I was using but I would really appreciate it if one you could help me out with this!
Thanks!
KitAffects.
value = math.random(1,3) if number(1)then function onTouched(m) p = m.Parent:findFirstChild("Humanoid") if p ~= nil then p.Torso.CFrame = CFrame.new(insert map location here) end end script.Parent.Touched:connect(onTouched) end
if number(2)then function onTouched(m) p = m.Parent:findFirstChild("Humanoid") if p ~= nil then p.Torso.CFrame = CFrame.new(insert map location here) end end script.Parent.Touched:connect(onTouched) end if number(2)then function onTouched(m) p = m.Parent:findFirstChild("Humanoid") if p ~= nil then p.Torso.CFrame = CFrame.new(insert map location here) end end script.Parent.Touched:connect(onTouched) end
Heres a basic version. It will teleport you very fast but does the job,
local map = {}--insert map location like game.workspace.map.MAP_NAME -- Example: local map = {game.Workspace.Map,game.Workspace.Map2,game.Workspace.Part} script.Parent.Touched:Connect(function(hit) for i,v in pairs(game.Players:GetChildren())do if hit.Parent ~= nil then if hit.Parent.Name == v.Name then local HumanoidRootPart = hit.Parent:FindFirstChild("HumanoidRootPart") if HumanoidRootPart ~= nil then HumanoidRootPart.CFrame = map[math.random(1,#map)].CFrame end end end end end)