How to make a BATTLEGROUNDS GAME on ROBLOX
Вставка
- Опубліковано 12 гру 2024
- About Zeeval
Hey there! I'm Zeeval, a passionate Roblox developer and UA-camr. I create content around Roblox development, including tutorials, gameplay, and tips to help you become a better developer. Join me as we explore the limitless possibilities of Roblox together!
Connect with Me
Twitter: x.com/ZeevalTh...
Discord: / discord
Stay updated with my latest projects, video releases, and behind-the-scenes content. Follow me on Twitter for real-time updates and community interaction!
Playlists
How to make a RNG game: • How to make a RNG GAME...
Buy my files
My files are available on my discord! Discord: / discord
Tags (ignore):
Roblox Studio tutorial, SOL's RNG game, Roblox game development, Roblox scripting, How to make a game in Roblox, Roblox Studio guide, Game design in Roblox, Roblox developer, Creating games on Roblox, Beginner Roblox Studio, RNG game mechanics, Roblox programming, Custom games in Roblox, Roblox Studio gameplay, Roblox game design, Learn Roblox development, Roblox Studio for beginners, Roblox game creation, Interactive game development, Roblox Studio projects
Wow tysm🎉🎉
43:55 timestamp
i have a bug and im not sure what to do, randomly all my scripts stopped working the character module part punch animations everything do you know what happened
Whats error?
Did you check output?
I'm only 9 mins in the video and I've rewatched that 9 minutes lots of times because for me the ragdoll doesn't make the dummy go far away when hitting it. do you have any ways to fix this
Timestamp 40:31
i am very lost 5:01
bro i need that script plese give
whats wrong with this script local Debris = game:GetService("Debris")
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local UserInputService = game:GetService("UserInputService")
local getCharacterInfo = ReplicatedStorage:WaitForChild("Remotes"):WaitForChild("getCharacterInfo")
local HitboxModule = require(ReplicatedStorage:WaitForChild("Modules"):WaitForChild("HitboxModule"))
local Config = require(ReplicatedStorage:WaitForChild("Modules"):WaitForChild("Config"))
local knockback = ReplicatedStorage:WaitForChild("Remotes"):WaitForChild("knockback")
local ragdoll = ReplicatedStorage:WaitForChild("Remotes"):WaitForChild("ragdoll")
local hitEvent = ReplicatedStorage:WaitForChild("Remotes"):WaitForChild("hit")
local applyDamage = ReplicatedStorage:WaitForChild("Remotes"):WaitForChild("applyDamage")
local animPrefix = "rbxassetid://"
local hitAnimationId = 104296364484131
local data = {
punch = {
debounceTime = 0.5,
onNum = 0,
maxNum = 4,
ondebounce = false,
hitPlayers = {},
animations = {
[1] = "114247098884450",
[2] = "111207872015504",
[3] = "83765252237801",
[4] = "78892023408267",
}
},
}
local player = Players.LocalPlayer
local function playAnim(Id)
local AnimId = animPrefix .. Id
local animation = Instance.new("Animation")
animation.AnimationId = AnimId
local humanoid = player.Character and player.Character:FindFirstChild("Humanoid")
if humanoid then
local animTrack = humanoid:LoadAnimation(animation)
animTrack:Play()
end
end
UserInputService.InputBegan:Connect(function(input, gpe)
if gpe then return end
if input.UserInputType == Enum.UserInputType.MouseButton1 then
local selectedChar, charDataTable = getCharacterInfo:InvokeServer()
if selectedChar and charDataTable and not data.punch.ondebounce then
data.punch.ondebounce = true
data.punch.onNum = (data.punch.onNum % data.punch.maxNum) + 1
playAnim(data.punch.animations[data.punch.onNum])
local hitbox = HitboxModule.CreateHitbox(player, "Block", Vector3.new(5, 5, 5))
Debris:AddItem(hitbox, 0.1)
hitbox.Touched:Connect(function(hit)
local humanoid = hit.Parent:FindFirstChildOfClass("Humanoid")
if humanoid then
local hitPlayer = Players:GetPlayerFromCharacter(hit.Parent)
local now = tick()
if hitPlayer and hitPlayer ~= player then
if not data.punch.hitPlayers[hitPlayer.Name] or now - data.punch.hitPlayers[hitPlayer.Name] >= data.punch.debounceTime then
data.punch.hitPlayers[hitPlayer.Name] = now
local hitChar = hit.Parent
local hrp = player.Character:WaitForChild("HumanoidRootPart")
local hitHrp = hitChar:WaitForChild("HumanoidRootPart")
if data.punch.onNum == 4 then
applyDamage:FireServer(hitChar, charDataTable.Atk.dmg * Config.HeavyDmgMult)
hitEvent:FireServer(hitChar, hitAnimationId, 1, "HIT", false, false)
knockback:FireServer(hitChar, player.Character, 25, 2)
task.wait(0.25)
ragdoll:FireServer(hit.Parent:FindFirstChild("IsRagdoll"), true)
task.delay(1, function()
ragdoll:FireServer(hit.Parent:FindFirstChild("IsRagdoll"), false)
end)
else
applyDamage:FireServer(hitChar, charDataTable.Atk.dmg)
if hrp and hitHrp then
hitHrp.CFrame = CFrame.lookAt(hitHrp.Position, hrp.Position)
end
hitEvent:FireServer(hitChar, hitAnimationId, 1, "HIT", true, true)
hitEvent:FireServer(hitChar, hitAnimationId, 1, "STUN", false, false)
end
end
end
if hit.Parent.Parent == workspace:WaitForChild("Dummys") then
local hitChar = hit.Parent
local hrp = player.Character:WaitForChild("HumanoidRootPart")
local hitHrp = hitChar:WaitForChild("HumanoidRootPart")
local now = tick()
if not data.punch.hitPlayers["Dummy"] or now - data.punch.hitPlayers["Dummy"] >= data.punch.debounceTime then
data.punch.hitPlayers["Dummy"] = now
if data.punch.onNum == 4 then
applyDamage:FireServer(hitChar, charDataTable.Atk.dmg * Config.HeavyDmgMult)
hitEvent:FireServer(hitChar, hitAnimationId, 1, "HIT", false, false)
knockback:FireServer(hitChar, player.Character, 25, 2)
task.wait(0.25)
ragdoll:FireServer(hit.Parent:FindFirstChild("IsRagdoll"), true)
task.delay(1, function()
ragdoll:FireServer(hit.Parent:FindFirstChild("IsRagdoll"), false)
end)
else
applyDamage:FireServer(hitChar, charDataTable.Atk.dmg)
if hrp and hitHrp then
hitHrp.CFrame = CFrame.lookAt(hitHrp.Position, hrp.Position)
end
hitEvent:FireServer(hitChar, hitAnimationId, 1, "HIT", true, true)
hitEvent:FireServer(hitChar, hitAnimationId, 1, "STUN", false, false)
end
end
end
end
end)
task.wait(data.punch.debounceTime)
data.punch.ondebounce = false
end
end
end)
hey bro now it work ?
@@zenpaiempire yea
@@Nobody-rblxx what was problem
@@zenpaiempire I forgot cause it was a bit ago
@@Nobody-rblxx plese can i get that ragdoll script that is on his discord. plese