I am trying to make a game like arm wrestling simulator but it will be called beat up simulator. I got stuck when trying to make the combat system like in arm wrestling simulator. I just cannot figure out how it works I have thought about a health system but that doesn’t work like arm wrestling simulator and yes I am going to add my own twist to it!
– NOT WORKING YET – I am the one asking for help –
this is my fighting script - Gobal
script.Parent.StartFight.Event:Connect(function(plr, CharacterToFight)
game.ReplicatedStorage.StartFight:FireClient(plr, CharacterToFight)
end)
local PlayerS = 1000
local AIS = 1000
script.Parent.RemoteEvent.OnServerEvent:Connect(function(plr)
PlayerS = tonumber(game.leaderstats.Leg.Value) + PlayerS
end)
here are some screenshots
![image](http://devforum-uploads.s3.dualstack.us-east-2.amazonaws.com/uploads/original/5X/2/5/1/2/2512ed7431215425043e8dd3688d4a23afd6d224.png)
- local script
local mouse = game.Players.LocalPlayer:GetMouse()
local Fighting = false
local DB = false
local AIFighting = ""
game:GetService("UserInputService").InputBegan:Connect(function(input, engine_processed)
if Fighting == true then
if not DB then
DB = true
if engine_processed then
return
end
if input.UserInputType == Enum.UserInputType.MouseButton1 then
game.Workspace.areanas["1"].RemoteEvent:FireServer()
coroutine.resume(coroutine.create(function()
local X = mouse.X
local Y = mouse.Y
print("Yes")
local AnimationThing = script.Parent.Parent.Animation:Clone()
AnimationThing.Parent = script.Parent
local NewX = X -- AnimationThing.AbsolutePosition.X
local NewY = Y -- AnimationThing.AbsolutePosition.Y
AnimationThing.Position = UDim2.new(0, NewX, 0, NewY)
AnimationThing.Size = UDim2.new(0, 100,0 ,100)
local Size = 0
--[[if AnimationThing.AbsoluteSize.X * AnimationThing.AbsoluteSize.Y then
Size = AnimationThing.AbsoluteSize.X*1.5
elseif AnimationThing.AbsoluteSize.X < AnimationThing.AbsoluteSize.Y then
Size = AnimationThing.AbsoluteSize.Y*1.5
elseif AnimationThing.AbsoluteSize.X == AnimationThing.AbsoluteSize.Y then
end]]
local Time = 0.3
AnimationThing:TweenSize(UDim2.new(0,Size,0,Size), "Out", "Quad", Time, false, nil)
wait(Time)
AnimationThing:Destroy()
end))
end
end
wait(0.05)
DB = false
end
end) ```
-- Start Battle Script - Global
```lua
script.Parent.ProximityPrompt.Triggered:Connect(function(plr)
if plr then
local number = 0
repeat
number = number +1
if number == 10 then
break
end
until workspace.areanas[number].Player.Value == false
plr.Character.HumanoidRootPart.CFrame = CFrame.new(workspace.areanas[number].plrTP.Position, workspace.areanas[number].plrTP.Orientation)
local Areana = workspace.areanas[number]
local AI = script.Parent.Parent:Clone()
AI.Parent = Areana.AITp
AI.HumanoidRootPart.CFrame = CFrame.new(Areana.AITp.Position, Areana.AITp.Orientation)
plr.Character.Humanoid.WalkSpeed = 0
plr.Character.Humanoid.JumpPower = 0
Areana.StartFight:Fire(plr, script.Parent.Parent.Name)
end
end) ```
-- more screen shots
![image|356x395](upload://fpmMnOlBHnna56lfogApfFEH2so.jpeg)
![image|690x169](upload://5643VbIzpv5ZsV6K7hPaSiuT1lD.jpeg)
fighting plate
![image|422x250](upload://sOWiOW9lNvQtjWhLx3ZFkWNy8xI.png)