#Getting Players and teleporting all of them at a position when part is touched
86 messages · Page 1 of 1 (latest)
try it
and we will see if that works
rasist
racist
you called me a monkey
nvm
i don't really have any knowledge of humanoidrootparts
it is getting all the players
yes
thats easy
that is what u need to do
ill just give u a script
then do lua plr.Humanoid.Health = 0 in that loop
function onTouched(part)
if part.Parent == nil then return end
local h = part.Parent:FindFirstChild("Humanoid")
if (h ~= nil) then
h.Parent:MoveTo(game.Workspace.E.Position)
end
end
NOOO
make sure its a normal script and put it inside the part you want them to teleport to
server script*
it works though
you should use CFrame
use Cframe and vecters
i will send the best code
do i need the cframe or the humanoidrootpart position
o
you dont need anything
just use the script i provided
and follow the instructions
it should work perfectly
it works
why do u want him
to create it himself
he can learn off the code
script.Parent.Touched:Connect:function(hit)
if hit.Parent:FindFirstChild("Humaniod") then
for _,player in ipairs(game.Players:GetPlayers()) do
local plr = player.Character
plr.Humanoid.Health = 0
end
end)``` @lone hare
in the script
i was doing it like this
use this lua script.Parent.Touched:Connect:function(hit) if hit.Parent:FindFirstChild("Humaniod") then for _,player in ipairs(game.Players:GetPlayers()) do local plr = player.Character plr.Humanoid.Health = 0 end end) @lone hare
my script works like a charm
just use this lua script.Parent.Touched:Connect:function(hit) if hit.Parent:FindFirstChild("Humaniod") then for _,player in ipairs(game.Players:GetPlayers()) do local plr = player.Character plr.Humanoid.Health = 0 end end) @lone hare
and set a spawn there
so yeah
ok
or instance a spawn there
i said there
set a spawn at the brick
it works
script.Parent.Touched:Connect:function(hit)
if hit.Parent:FindFirstChild("Humaniod") then
for _,player in ipairs(game.Players:GetPlayers()) do
local plr = player.Character
plr.HumanoidRootPart.Position = Vector3.new(script.Parent.Position)
end
end)``` @lone hare updated
isn't this teleporting the player to the parent?
no because it is the script.Parent
the scripts parent is the part
if that doesn;t work remove the position
yay
cuz of me right?
you can
i used mine
i helped a bit
ye
cuz i didn't knew how to code the plr.HumanoidRootPart.Position = Vectro3.new(etc..)
xD
xD
i really need to get better at scripting
are u good at modelling
this is like the 4th time im using the posts for these things
anyway thanks for the help