Тёмный

How To Make a Kickable Ball In Roblox Studio 

MoreKeyHitt
Подписаться 446
Просмотров 814
50% 1

Thx For Watching, Also Sure You Don't Have to use a script to make a kickable ball but it'll be more finicky
Script:
-- Get the part
local part = script.Parent
-- Get the sound
local sound = part:FindFirstChild("Sound1")
-- Debounce variable
local isTouched = false
-- Function to handle the touch event
local function onTouch(otherPart)
local humanoid = otherPart.Parent:FindFirstChild("Humanoid")
if humanoid and not isTouched then
-- Set debounce
isTouched = true
-- Play the sound
if sound and sound:IsA("Sound") then
sound:Play()
end
-- Apply force to the part to make it move in the direction the player kicked it
local direction = (part.Position - humanoid.Parent.HumanoidRootPart.Position).Unit
local forceMagnitude = math.random(20, 40) -- Change this value to control the force applied
local force = direction * forceMagnitude
part.Velocity = Vector3.new(force.X, part.Velocity.Y, force.Z)
-- Reset debounce after a delay
wait(1) -- Change this value to control the debounce time
isTouched = false
end
end
-- Connect the function to the part's Touched event
part.Touched:Connect(onTouch)

Опубликовано:

 

16 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 11   
@ExoticDevOfficial
@ExoticDevOfficial 2 месяца назад
here before this blows up
@rafail_gamer12
@rafail_gamer12 2 месяца назад
me
@MisterBiist6000
@MisterBiist6000 2 месяца назад
guess before watching video when its touched ur gonna add vectorforce
@jah844
@jah844 2 месяца назад
woah maybe if you taught us how to make it instead of giving us a copy and paste we would learn something 😮🤯
@naknu2637
@naknu2637 2 месяца назад
Self learning is better than youtube tutorials I now understand how this system works
@MoreKeyHitt
@MoreKeyHitt 2 месяца назад
I've Told This To Someone Before, If You Want to Learn Something Don't Watch A 15 Second Video Expecting To Learn Anything.
@nguyenthiminhkhai4316
@nguyenthiminhkhai4316 2 месяца назад
first
@Jozkemz
@Jozkemz 2 месяца назад
LOL
@chaodaica5738
@chaodaica5738 2 месяца назад
pls explain the code
@MoreKeyHitt
@MoreKeyHitt 2 месяца назад
Sorry But My Channel's Tutorials Are Ment to Get To The Point Quicker Without Having To Talk About How The Code Works
@F1R3CPU
@F1R3CPU 2 месяца назад
It is a 15 seconds video, better look at the code and understand what it does. Then apply what you learned to your OWN code, don't ever copy paste someone's code if you want to learn
Далее
12 Minutes of USELESS INFORMATION about ROBLOX
12:02
Просмотров 621 тыс.
New to Studio? Get These FREE Plugins!
9:40
Просмотров 430 тыс.
Silent Hill 2 - Мульт Обзор
07:26
Просмотров 389 тыс.
I Made a Roblox BATTLEGROUNDS Game in 1 WEEK
9:51
Просмотров 71 тыс.
I Spent 24 HOURS Learning Scripting In Roblox
15:50
Просмотров 16 тыс.
3 Hours vs. 3 Years of Blender
17:44
Просмотров 5 млн
I Made a Fake Warning to Scare Roblox Players
16:31
Просмотров 1,5 млн
This Roblox Hat is ANIMATED
10:29
Просмотров 2,1 млн
How To Make GUI | Roblox Studio
10:35
Просмотров 302 тыс.
What Is The Best AI For Roblox Studio Scripting?
10:42
Просмотров 451 тыс.
How players pushed a Merging game to its limit
17:22
Просмотров 1,7 млн