I do not speak english as many people do
-
So, i’ve been working for a while in this script but it still doesn’t work, i had no errors or outputs.
-
The Script is about a jojo stand character, his abilities includes this: remote explosion.
Since he touched you, you turns into a bomb that can be detonated.
- so here is the script inspired in it:
local rp = game:GetService("ReplicatedStorage") local Punch = rp:WaitForChild("KiraQueen"):WaitForChild("Explosion") local Debris = game:GetService("Debris") local damage = 10 local attacked = false local target local targetdebounce = false Punch.OnServerEvent:Connect(function(Player) if attacked == false then local Character = Player.Character local Humanoid = Character:WaitForChild("Humanoid") local HumanoidRP = Character:WaitForChild("HumanoidRootPart") local Stand = workspace:FindFirstChild(Player.Name.." Stand"):WaitForChild("Dummy") local folder = Instance.new("Folder",workspace) folder.Name = Player.Name.." Explosion" Debris:AddItem(folder,.5) if Stand then local prevWeld = Stand:WaitForChild("HumanoidRootPart"):WaitForChild("Stand Weld") prevWeld:Destroy() Stand:WaitForChild("HumanoidRootPart").CFrame = HumanoidRP.CFrame * CFrame.new(0,-.5,-2) local weld = Instance.new("ManualWeld") weld.Name = "Stand Weld" weld.Part0 = Stand:WaitForChild("HumanoidRootPart") weld.Part1 = HumanoidRP weld.C0 = Stand:WaitForChild("HumanoidRootPart").CFrame:inverse() * HumanoidRP.CFrame weld.Parent = weld.Part0 local Hand = Stand:WaitForChild("LeftHand") local animControl = Stand:WaitForChild("AnimControl") local Punch = animControl:LoadAnimation(script:WaitForChild("LeftPunch")) Punch:Play() local HitBox = script:WaitForChild("HitBox"):Clone() HitBox.CFrame = Hand.CFrame HitBox.Parent = folder local Pweld = Instance.new("Weld") Pweld.Part0 = HitBox Pweld.Part1 = Hand Pweld.C0 = HitBox.CFrame:inverse() * Hand.CFrame Pweld.Parent = Pweld.Part0 HitBox.Touched:Connect(function(Hit) if Hit:IsA("Part") or Hit:IsA("MeshPart") then if Hit.Parent ~= Character then local EHumanoid = Hit.Parent:FindFirstChild("Humanoid") if EHumanoid then HitBox:Destroy() if targetdebounce == false then targetdebounce = true target=Hit.Parent.Name attacked = true end end end end end) wait(.5) local prevWeld = Stand:WaitForChild("HumanoidRootPart"):WaitForChild("Stand Weld") prevWeld:Destroy() Stand:WaitForChild("HumanoidRootPart").CFrame = HumanoidRP.CFrame * CFrame.new(2,0,2) local weld = Instance.new("ManualWeld") weld.Name = "Stand Weld" weld.Part0 = Stand:WaitForChild("HumanoidRootPart") weld.Part1 = HumanoidRP weld.C0 = Stand:WaitForChild("HumanoidRootPart").CFrame:inverse() * HumanoidRP.CFrame weld.Parent = weld.Part0 elseif attacked == true then else local sound = Instance.new("Sound",folder) sound.SoundId = "rbxassetid://2174934844" sound.Volume = 1 sound:Play() Debris:AddItem(sound,.5) local t = workspace:FindFirstChild(target) if t~=nil then t:BreakJoints() end end end end)
So, it just doesn’t work.
-It only plays the animation
oh, the remote event is fired when player press ‘x’ and the serverscript is focused on the stand not player:
Model > AnimControl
THE GAME : https://www.roblox.com/games/4995711184/JoJo-Untitled-Adventure