So, I am trying to make it so that players teleport randomly to the location of different bricks on my map. I have no idea on how to use random numbers with this, or if that has any correlation with what I am trying to do. What do I have to tweak to make this teleport them to random blocks?
function onTouched(part)
local h = part.Parent:findFirstChild("Humanoid")
if h ~= nil then
t = h.Parent.Torso
t.CFrame = CFrame.new(script.Parent.Parent.Part1.Position)
end
end
script.Parent.Touched:connect(onTouched)
Thank you for your help, -Samson554

2 comments
Oh! I knew I had to use the math.random piece in there somewhere. Thanks!
Np!