How do I teleport all players to one location inside of the workspace?
-
What do you want to achieve?
An image button that teleports all the players to one location in the map -
What is the issue?
error: can’t set value or it won’t do anything at all -
What solutions have you tried so far?
I tried looking at the DevForum, but I didn’t find anything.
Here is my script:
script.Parent.MouseButton1Click:Connect(function()
if script.Parent.Parent.Timer.CanSend.Value == true then
script.Parent.Parent.Timer.CanSend.Value = false
script.Parent.Parent.Timer.Visible = true
local Hint = Instance.new("Hint", workspace)
for i, v in pairs(game.Players:GetPlayers()) do
v.Character.Humanoid.MoveDirection = Vector3.new(568.64, 725.96, 341.66)
end
Hint.Text = "new emergency"
wait(3)
Hint.Text = "talk about stuff"
wait(3)
Hint:Destroy()
wait(30)
script.Parent.Parent.Timer.CanSend.Value = true
script.Parent.Parent.Timer.Visible = false
end
end)
Another script version:
script.Parent.MouseButton1Click:Connect(function()
if script.Parent.Parent.Timer.CanSend.Value == true then
script.Parent.Parent.Timer.CanSend.Value = false
script.Parent.Parent.Timer.Visible = true
local Hint = Instance.new("Hint", workspace)
for i, v in pairs(game.Players:GetPlayers()) do
v.Character.Humanoid:Move(Vector3.new(568.64, 725.96, 341.66), v.Character.HumanoidRootPart)
end
Hint.Text = "new emergency"
wait(3)
Hint.Text = "talk about stuff"
wait(3)
Hint:Destroy()
wait(30)
script.Parent.Parent.Timer.CanSend.Value = true
script.Parent.Parent.Timer.Visible = false
end
end)