Top.Mail.Ru
Ответы

Как ЭТО СДЕЛАТЬ ?!?!??!?!?

Вообщем делаю шаровую молнию она должна двигаться в сторону человека кто нажал кнопку part.Clickdetecktor Напишите скрипт жпжпжпжпжп

По дате
По рейтингу
Аватар пользователя
Мудрец
9мес
12345678910111213141516171819202122232425
 local part = script.Parent -- Предполагаем, что скрипт прикреплен к части 
local clickDetector = part:FindFirstChild("ClickDetector") 
 
if not clickDetector then 
    warn("ClickDetector не найден в части!") 
    return 
end 
 
clickDetector.MouseClick:Connect(function(player) 
    if player and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then 
        local targetPosition = player.Character.HumanoidRootPart.Position + Vector3.new(0, 5, 0) -- Поднимаем шар над игроком 
 
        -- Плавное движение к игроку 
        local function moveToTarget() 
            while (part.Position - targetPosition).magnitude > 1 do 
                part.Position = part.Position:Lerp(targetPosition, 0.1) -- Плавное движение 
                wait(0.1) 
            end 
        end 
 
        moveToTarget() 
    else 
        warn("Игрок или его HumanoidRootPart не найдены!") 
    end 
end) 
Аватар пользователя
Мастер
9мес

function()
cum.into.parent.AlexandrPechenkin
end

Аватар пользователя
Профи
9мес

Шаровую молнию глаз не может увидеть