Why do I spawn as R15 even tho my game is set to R6?
And when I reset, it makes me R6…
Anyone else have this problem?
Are you sure you’ve marked this option in Roblox Studio and then saved it?
It works perfectly for me
Yes I have, I’ve made sure already, but when I spawn and my character hasnt loaded yet (invisible) then equip a tool, it turns me into R15.
What tool is it? There might be a script inside the tool that makes the player r15 or something
A combat system, it’s compatible with both R6 and R15, my friend commisioned it for me.
If there isn’t a bug in the script, then it might be the system. It works fine for me so I’m not sure. Could you provide the actual script (since this is literally scripting support) so we can take a look at it and tell you what might be causing it?
It’s a whole system, different scripts, modules, etc. so that would take very long and I don’t think the script is broken since it has no errors or whatsoever…
If the scripts are named, try finding a script that you think deals with things like humanoid, etc.
FrameWorkClient modulescript
local FrameWork = {}
--// Variables //--
local Modules = {
["Hitbox"] = require(game.ReplicatedStorage.Modules:WaitForChild("Hitbox"));
["CamShaker_Mod"] = require(game.ReplicatedStorage.Modules:WaitForChild("CameraShaker"));
["GlobalEffects"] = require(script:WaitForChild("Global_Effects"))
}
local Tween = game:GetService("TweenService")
--// Global Functions //--
function _G.Debris(Thing,Time)
if Time ~= nil and Thing ~= nil then
game.Debris:AddItem(Thing,Time)
end
end
--// Play Animation //--
function FrameWork.Animation(AnimationObject,Hum,Type)
if Type == nil then
if AnimationObject ~= nil and Hum ~= nil then
local Animation = Hum:LoadAnimation(AnimationObject)
Animation:Play(0.100000001, 1.15)
end
elseif Type == "Stop" then
local AnimationTracks = Hum:GetPlayingAnimationTracks()
for i, track in pairs (AnimationTracks) do
if track.Name == AnimationObject then
track:Stop()
end
end
end
end
--// Cam Shake //--
function FrameWork.CamShake(Type,Root)
if Type ~= nil and Root ~= nil then
if Type == "Hit" then
Modules.CamShaker_Mod.TinyShake(Root.Position)
end
end
end
--// Unblock //--
function FrameWork.Unblock(Hum)
if Hum ~= nil then
local AnimationTracks = Hum:GetPlayingAnimationTracks()
for i, track in pairs (AnimationTracks) do
if track.Name == "Block" or track.Name == "SwordBlock" then
track:Stop()
end
end
end
end
--// Play Sound //--
function FrameWork.Sound(SoundObject,Properties,DebrisTime)
if SoundObject ~= nil and Properties ~= nil then
local Sound = SoundObject:Clone()
for i,v in pairs(Properties) do
Sound[i] = v
end
Sound:Play()
if DebrisTime then
_G.Debris(Sound,DebrisTime)
end
end
end
--// Create Ting //--
function FrameWork.CreateTing(Type,Properties,DebrisTime)
if Type ~= nil and Properties ~= nil then
local Thing = Instance.new(Type)
--// Properties //--
for i,v in pairs(Properties) do
Thing[i] = v
end
if DebrisTime then
_G.Debris(Thing,DebrisTime)
end
end
end
--// Damage Text //--
function FrameWork.DamageTing(Humrp,Damage,Type,Color)
if Humrp ~= nil and Damage ~= nil then
if Type == nil then
local bill = game.ReplicatedStorage.Effects.Dmg:Clone()
bill.Parent = Humrp
if Damage >= 7.5 then
local random = math.random(1, 7)
local message
if random == 1 then
message = "OH! THATS A BASEBALL!"
elseif random == 2 then
message = "PACKWATCH!"
elseif random == 3 then
message = "SHINEI!"
elseif random == 4 then
message = "SKILL ISSUE!"
elseif random == 5 then
message = "COPE!"
elseif random == 6 then
message = "RATIO!"
elseif random == 7 then
message = "Deal with it."
end
bill.Frame.TextLabel.Text = message
else
bill.Frame.TextLabel.Text = tostring(Damage)
end
coroutine.resume(coroutine.create(function()
game.Debris:AddItem(bill,1.2)
local Tween2 = game:GetService("TweenService"):Create(bill,TweenInfo.new(0.4,Enum.EasingStyle.Back,Enum.EasingDirection.Out,0,false,0),{StudsOffset = Vector3.new(math.random(-3,3),math.random(-3,3),math.random(-3,3))})
Tween2:Play()
local randRot = math.random(-30,30)
local Tween6 = game:GetService("TweenService"):Create(bill.Frame.TextLabel,TweenInfo.new(.5,Enum.EasingStyle.Back,Enum.EasingDirection.Out,0,false,0),{Rotation = randRot})
Tween6:Play()
--local Tween = game:GetService("TweenService"):Create(bill.TextLabel,TweenInfo.new(1,Enum.EasingStyle.Exponential,Enum.EasingDirection.Out,0,false,0),{TextColor3 = Color3.fromRGB(255, 255, 255)})
--Tween:Play()
wait(0.55)
local Tween = game:GetService("TweenService"):Create(bill.Frame.TextLabel,TweenInfo.new(.5,Enum.EasingStyle.Exponential,Enum.EasingDirection.Out,0,false,0),{TextSize = 0})
Tween:Play()
local Tween = game:GetService("TweenService"):Create(bill.Frame.TextLabel,TweenInfo.new(1,Enum.EasingStyle.Exponential,Enum.EasingDirection.Out,0,false,0),{TextColor3 = Color3.fromRGB(255, 0, 0)})
Tween:Play()
local Tween3 = game:GetService("TweenService"):Create(bill.Frame.TextLabel,TweenInfo.new(2,Enum.EasingStyle.Exponential,Enum.EasingDirection.Out,0,false,0),{TextTransparency = 1,TextStrokeTransparency = 1})
Tween3:Play()
end))
elseif Type == "TextT" and Color ~= nil then
local bill = game.ReplicatedStorage.Effects.Dmg:Clone()
bill.Parent = Humrp
bill.Frame.TextLabel.Text = Damage
bill.Frame.TextLabel.TextSize = 25
bill.Frame.TextLabel.TextColor3 = Color
coroutine.resume(coroutine.create(function()
game.Debris:AddItem(bill,1.2)
local randRot = math.random(-30,30)
local Tween6 = game:GetService("TweenService"):Create(bill.Frame.TextLabel,TweenInfo.new(.5,Enum.EasingStyle.Back,Enum.EasingDirection.Out,0,false,0),{Rotation = randRot})
Tween6:Play()
--local Tween = game:GetService("TweenService"):Create(bill.TextLabel,TweenInfo.new(1,Enum.EasingStyle.Exponential,Enum.EasingDirection.Out,0,false,0),{TextColor3 = Color3.fromRGB(255, 255, 255)})
--Tween:Play()
wait(.5)
local Tween = game:GetService("TweenService"):Create(bill.Frame.TextLabel,TweenInfo.new(.5,Enum.EasingStyle.Exponential,Enum.EasingDirection.Out,0,false,0),{TextSize = 35})
Tween:Play()
local Tween3 = game:GetService("TweenService"):Create(bill.Frame.TextLabel,TweenInfo.new(.5,Enum.EasingStyle.Exponential,Enum.EasingDirection.Out,0,false,0),{TextTransparency = 1,TextStrokeTransparency = 1})
Tween3:Play()
end))
end
end
end
--// Sword Stuff //--
function FrameWork.SwordSpawn(plr)
if plr ~= nil then
repeat wait() until plr.Character ~= nil and plr.Character:FindFirstChild("UpperTorso") ~= nil
local Sword = game.ReplicatedStorage.Swords:FindFirstChild("Basic Sword"):Clone()
Sword.Parent = plr.Character
local MainCframe = plr.Character.Torso.CFrame * CFrame.new(-1,-1.2,-.9)
Sword:SetPrimaryPartCFrame(MainCframe * CFrame.Angles(math.rad(110),0,0))
--// Weld
local Weld = Instance.new("WeldConstraint")
Weld.Part0 = Sword.Handle
Weld.Part1 = plr.Character.Torso
Weld.Parent = Sword.Handle
Weld.Name = "MainWeld"
end
end
function FrameWork.SwordUnsheathe(plr,SwordName)
if plr ~= nil and SwordName ~= nil then
repeat wait() until plr.Character ~= nil and plr.Character:FindFirstChild("Right Arm") ~= nil
if plr.Character ~= nil and plr.Character:FindFirstChild(SwordName) ~= nil then
local Sword = plr.Character:FindFirstChild(SwordName)
if Sword.Handle:FindFirstChild("MainWeld") ~= nil then
Sword.Handle:FindFirstChild("MainWeld"):Destroy()
end
if not plr.Character:FindFirstChild("SwordOut") then
local SwordOut = Instance.new("BoolValue")
SwordOut.Name = "SwordOut"
SwordOut.Parent = plr.Character
end
local MainCframe = plr.Character["Right Arm"].CFrame * CFrame.new(0,-.1,0)
Sword:SetPrimaryPartCFrame(MainCframe * CFrame.Angles(math.rad(90),0,math.rad(180)))
--// Weld
local Weld = Instance.new("WeldConstraint")
Weld.Part0 = Sword.Handle
Weld.Part1 = plr.Character["Right Arm"]
Weld.Parent = Sword.Handle
Weld.Name = "MainWeld"
end
end
end
function FrameWork.SwordSheathe(plr,SwordName)
if plr ~= nil and SwordName ~= nil then
repeat wait() until plr.Character ~= nil and plr.Character:FindFirstChild("Torso") ~= nil
if plr.Character ~= nil and plr.Character:FindFirstChild(SwordName) ~= nil then
local Sword = plr.Character:FindFirstChild(SwordName)
if Sword.Handle:FindFirstChild("MainWeld") ~= nil then
Sword.Handle:FindFirstChild("MainWeld"):Destroy()
end
if plr.Character:FindFirstChild("SwordOut") then
plr.Character:FindFirstChild("SwordOut"):Destroy()
end
local MainCframe = plr.Character.Torso.CFrame * CFrame.new(-1,-1.2,-.9)
Sword:SetPrimaryPartCFrame(MainCframe * CFrame.Angles(math.rad(110),0,0))
--// Weld
local Weld = Instance.new("WeldConstraint")
Weld.Part0 = Sword.Handle
Weld.Part1 = plr.Character.Torso
Weld.Parent = Sword.Handle
Weld.Name = "MainWeld"
end
end
end
--// Ground Slam Effects //--
function FrameWork.GroundSlam(EnemyRoot,CFrameMain,MainChar)
if EnemyRoot ~= nil and CFrameMain ~= nil then
--// Sound
local Sound = game.ReplicatedStorage.Sounds.Slam:FindFirstChild("Ground_Slam3"):Clone()
Sound.Parent = EnemyRoot
Sound:Play()
_G.Debris(Sound,2)
--// Beam Effects
for i=1,3 do
local Sphere = game.ReplicatedStorage.Effects:FindFirstChild("Sphere"):Clone()
Sphere.Parent = workspace.FX
Sphere.CFrame = EnemyRoot.CFrame
Sphere.Orientation = Vector3.new(math.random(-90,90),0,math.random(-90,90))
Sphere.Size = Vector3.new(2.6, math.random(15,20), 2.6)
Tween:Create(Sphere, TweenInfo.new(.5,Enum.EasingStyle.Quad,Enum.EasingDirection.Out), {CFrame = Sphere.CFrame*CFrame.new(0,20,0),Size = Vector3.new(0,0,0),Transparency = 0.4}):Play()
game.Debris:AddItem(Sphere,1)
end
--// Ground Slam Particles
local Ground_Slam = game.ReplicatedStorage.Effects:WaitForChild("GroundSlam"):Clone()
Ground_Slam.Parent = workspace.FX
Ground_Slam.CFrame = CFrameMain * CFrame.new(0,-2,0)
game.Debris:AddItem(Ground_Slam,4)
--// Raycast For Hit //--
local rayOrigin,rayDirection,params = CFrameMain.Position,CFrameMain.UpVector * -20,RaycastParams.new()
local tableyes = {EnemyRoot.Parent,workspace.FX,MainChar}
for i,v in pairs(workspace.FX:GetDescendants()) do
if v:IsA("BasePart") then
table.insert(tableyes,v)
end
end
params.FilterDescendantsInstances,params.FilterType = tableyes,Enum.RaycastFilterType.Blacklist
local Hit = workspace:Raycast(rayOrigin,rayDirection,params)
if Hit then
for i,v in pairs(Ground_Slam:GetDescendants()) do
if v:IsA("ParticleEmitter") then
v:Emit(v:GetAttribute("EmitCount"))
if v.Name == "Smoke" then-- or "Rocks" then
v.Color = ColorSequence.new(Hit.Instance.Color)
end
end
end
end
--// Ground Rocks
Modules.GlobalEffects.Ground_Rocks(15,CFrameMain,EnemyRoot.Parent,Vector3.new(2.3,2.3,2.3),5,3,MainChar)
--// Flying Rocks
Modules.GlobalEffects.Flying_Debris(CFrameMain * CFrame.new(0,-5,0),EnemyRoot.Parent,75,55,5,MainChar)
end
end
--// Normal Combat //--
function FrameWork.Combat(Type,MainChar,EnemyChar,Count)
if Type == "Hit" then
--// Sounds, Animations, CFrame Setting, etc.. //--
if Count ~= nil then
FrameWork.Sound(game.ReplicatedStorage.Sounds.Hit:WaitForChild("Punch"..Count),{Parent = EnemyChar.HumanoidRootPart},2)
if EnemyChar:FindFirstChild("Humanoid") ~= nil and EnemyChar.Humanoid.Health > 0 and EnemyChar:FindFirstChild("HumanoidRootPart") ~= nil and MainChar:FindFirstChild("HumanoidRootPart") ~= nil then
FrameWork.Animation(game.ReplicatedStorage.Animations.Hit:WaitForChild("Recoil"..Count),EnemyChar.Humanoid)
if EnemyChar:FindFirstChild("Blocking") == nil then
EnemyChar.HumanoidRootPart.CFrame = CFrame.new(EnemyChar.HumanoidRootPart.Position,MainChar.HumanoidRootPart.Position)
end
if Count < 5 then
FrameWork.CreateTing("BodyVelocity",{Parent = EnemyChar.HumanoidRootPart,MaxForce = Vector3.new(4e4,0,4e4),Velocity = MainChar.HumanoidRootPart.CFrame.LookVector * 30},.05)
elseif Count == 5 then
FrameWork.CreateTing("BodyVelocity",{Parent = EnemyChar.HumanoidRootPart,MaxForce = Vector3.new(4e4,0,4e4),Velocity = MainChar.HumanoidRootPart.CFrame.LookVector * 50},.2)
local AdditionalForce = 50
local HumanoidRootPart = EnemyChar:WaitForChild("HumanoidRootPart");
HumanoidRootPart:ApplyImpulse(Vector3.new(HumanoidRootPart.AssemblyMass * AdditionalForce, 0, 0)) -- takes Vector3(x, y, z)
end
end
if game.Players:FindFirstChild(MainChar.Name) ~= nil and game.ReplicatedStorage.PlayersData:FindFirstChild(MainChar.Name.."Data") ~= nil and game.ReplicatedStorage.PlayersData[MainChar.Name.."Data"]:FindFirstChild("Hit") ~= nil then
game.ReplicatedStorage.PlayersData[MainChar.Name.."Data"].Hit.Value += 1
end
EnemyChar.Humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
end
--// Effects :) //--
if EnemyChar:FindFirstChild("Humanoid") ~= nil and EnemyChar.Humanoid.Health > 0 and EnemyChar:FindFirstChild("HumanoidRootPart") ~= nil and MainChar:FindFirstChild("HumanoidRootPart") ~= nil then
local HitEffect = game.ReplicatedStorage.Effects.HitEffect:WaitForChild("HitEffect"):Clone()
HitEffect.Parent = EnemyChar.HumanoidRootPart
_G.Debris(HitEffect,2)
for i,v in pairs(HitEffect:GetChildren()) do
if v:IsA("ParticleEmitter") then
v:Emit(v:GetAttribute("EmitCount"))
end
end
end
if EnemyChar:FindFirstChild("Humanoid") ~= nil and EnemyChar.Humanoid.Health > 0 and EnemyChar:FindFirstChild("HumanoidRootPart") ~= nil and MainChar:FindFirstChild("HumanoidRootPart") ~= nil then
local HitEffect = game.ReplicatedStorage.Effects.HitEffect:WaitForChild("HitEffect"):Clone()
HitEffect.Parent = EnemyChar.HumanoidRootPart
_G.Debris(HitEffect,2)
for i,v in pairs(HitEffect:GetChildren()) do
if v:IsA("ParticleEmitter") then
v:Emit(v:GetAttribute("EmitCount"))
end
end
end
elseif Type == "BlockSword" then
if EnemyChar:FindFirstChild("Humanoid") ~= nil and EnemyChar.Humanoid.Health > 0 and EnemyChar:FindFirstChild("HumanoidRootPart") ~= nil and MainChar:FindFirstChild("HumanoidRootPart") ~= nil then
FrameWork.Animation(game.ReplicatedStorage.Animations.Blocking:WaitForChild("BlockHit"),EnemyChar.Humanoid)
FrameWork.Sound(game.ReplicatedStorage.Sounds.Block:WaitForChild("SwordBlock"..Count),{Parent = EnemyChar.HumanoidRootPart},2)
local BlockHit = game.ReplicatedStorage.Effects.BlockingSword:WaitForChild("BlockingSword"):Clone()
BlockHit.Parent = EnemyChar.HumanoidRootPart
BlockHit.WorldOrientation = Vector3.new(math.random(-360,360),math.random(-360,360),math.random(-360,360))
_G.Debris(BlockHit,2)
for i,v in pairs(BlockHit:GetChildren()) do
if v:IsA("ParticleEmitter") then
v:Emit(v:GetAttribute("EmitCount"))
end
end
FrameWork.CreateTing("BodyVelocity",{Parent = EnemyChar.HumanoidRootPart,MaxForce = Vector3.new(4e4,0,4e4),Velocity = MainChar.HumanoidRootPart.CFrame.LookVector * 16},.05)
EnemyChar.Humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
end
elseif Type == "SwordHit" then
--// Sounds, Animations, CFrame Setting, etc.. //--
if Count ~= nil then
FrameWork.Sound(game.ReplicatedStorage.Sounds.Sword:WaitForChild("Sword"..Count),{Parent = EnemyChar.HumanoidRootPart},2)
if EnemyChar:FindFirstChild("Humanoid") ~= nil and EnemyChar.Humanoid.Health > 0 and EnemyChar:FindFirstChild("HumanoidRootPart") ~= nil and MainChar:FindFirstChild("HumanoidRootPart") ~= nil then
FrameWork.Animation(game.ReplicatedStorage.Animations.Hit:WaitForChild("Recoil"..Count),EnemyChar.Humanoid)
if EnemyChar:FindFirstChild("Blocking") == nil then
EnemyChar.HumanoidRootPart.CFrame = CFrame.new(EnemyChar.HumanoidRootPart.Position,MainChar.HumanoidRootPart.Position)
end
if Count < 5 then
FrameWork.CreateTing("BodyVelocity",{Parent = EnemyChar.HumanoidRootPart,MaxForce = Vector3.new(4e4,0,4e4),Velocity = MainChar.HumanoidRootPart.CFrame.LookVector * 16.5},.05)
elseif Count == 5 then
FrameWork.CreateTing("BodyVelocity",{Parent = EnemyChar.HumanoidRootPart,MaxForce = Vector3.new(4e4,0,4e4),Velocity = MainChar.HumanoidRootPart.CFrame.LookVector * 30},.2)
end
EnemyChar.Humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
end
if game.Players:FindFirstChild(MainChar.Name) ~= nil and game.ReplicatedStorage.PlayersData:FindFirstChild(MainChar.Name.."Data") ~= nil and game.ReplicatedStorage.PlayersData[MainChar.Name.."Data"]:FindFirstChild("Hit") ~= nil then
game.ReplicatedStorage.PlayersData[MainChar.Name.."Data"].Hit.Value += 1
end
end
--// Effects :) //--
if EnemyChar:FindFirstChild("Humanoid") ~= nil and EnemyChar.Humanoid.Health > 0 and EnemyChar:FindFirstChild("HumanoidRootPart") ~= nil and MainChar:FindFirstChild("HumanoidRootPart") ~= nil then
local HitEffect = game.ReplicatedStorage.Effects.Slash:WaitForChild("Slash"):Clone()
HitEffect.Parent = EnemyChar.HumanoidRootPart
_G.Debris(HitEffect,2)
for i,v in pairs(HitEffect:GetChildren()) do
if v:IsA("ParticleEmitter") then
v:Emit(v:GetAttribute("EmitCount"))
end
end
end
elseif Type == "Block" then
if EnemyChar:FindFirstChild("Humanoid") ~= nil and EnemyChar.Humanoid.Health > 0 and EnemyChar:FindFirstChild("HumanoidRootPart") ~= nil and MainChar:FindFirstChild("HumanoidRootPart") ~= nil then
FrameWork.Animation(game.ReplicatedStorage.Animations.Blocking:WaitForChild("BlockHit"),EnemyChar.Humanoid)
FrameWork.Sound(game.ReplicatedStorage.Sounds.Block:WaitForChild("BlockHit"..Count),{Parent = EnemyChar.HumanoidRootPart},1.5)
local BlockHit = game.ReplicatedStorage.Effects.Block:WaitForChild("Blocking"):Clone()
BlockHit.Parent = EnemyChar.HumanoidRootPart
_G.Debris(BlockHit,2)
for i,v in pairs(BlockHit:GetChildren()) do
if v:IsA("ParticleEmitter") then
v:Emit(v:GetAttribute("EmitCount"))
end
end
FrameWork.CreateTing("BodyVelocity",{Parent = EnemyChar.HumanoidRootPart,MaxForce = Vector3.new(4e4,0,4e4),Velocity = MainChar.HumanoidRootPart.CFrame.LookVector * 16},.05)
EnemyChar.Humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
end
elseif Type == "PerfectBlock" then
if EnemyChar:FindFirstChild("Humanoid") ~= nil and EnemyChar.Humanoid.Health > 0 and EnemyChar:FindFirstChild("HumanoidRootPart") ~= nil and MainChar:FindFirstChild("HumanoidRootPart") ~= nil and MainChar:FindFirstChild("Humanoid") ~= nil then
FrameWork.Sound(game.ReplicatedStorage.Sounds.Block:WaitForChild("PerfectBlock"),{Parent = MainChar.HumanoidRootPart},1.2)
FrameWork.Animation(game.ReplicatedStorage.Animations.Hit:WaitForChild("Recoil5"),MainChar.Humanoid)
--// Effects //--
local PB = game.ReplicatedStorage.Effects.PB:WaitForChild("PB"):Clone()
PB.Parent = EnemyChar.HumanoidRootPart
_G.Debris(PB,2)
for i,v in pairs(PB:GetChildren()) do
if v:IsA("ParticleEmitter") then
v:Emit(v.Name)
end
end
end
elseif Type == "BlockBroken" then
if EnemyChar:FindFirstChild("Humanoid") ~= nil and EnemyChar.Humanoid.Health > 0 and EnemyChar:FindFirstChild("HumanoidRootPart") ~= nil and MainChar:FindFirstChild("HumanoidRootPart") ~= nil and MainChar:FindFirstChild("Humanoid") ~= nil then
FrameWork.Animation(game.ReplicatedStorage.Animations.Blocking:WaitForChild("BlockBreak"),EnemyChar.Humanoid)
FrameWork.Sound(game.ReplicatedStorage.Sounds.Block:WaitForChild("BlockBreak"),{Parent = MainChar.HumanoidRootPart},2.3)
FrameWork.CreateTing("BodyVelocity",{Parent = EnemyChar.HumanoidRootPart,MaxForce = Vector3.new(4e4,0,4e4),Velocity = MainChar.HumanoidRootPart.CFrame.LookVector * 16},.05)
local BlockBreak = game.ReplicatedStorage.Effects.BlockBroken:WaitForChild("BlockBroken"):Clone()
BlockBreak.Parent = EnemyChar.HumanoidRootPart
_G.Debris(BlockBreak,2)
for i,v in pairs(BlockBreak:GetChildren()) do
if v:IsA("ParticleEmitter") then
v:Emit(v:GetAttribute("EmitCount"))
end
end
coroutine.resume(coroutine.create(function()
wait(2)
FrameWork.Animation("BlockBreak",EnemyChar.Humanoid,"Stop")
end))
EnemyChar.Humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
end
elseif Type == "Air_Up" then
--// Settings //--
if game.Players:FindFirstChild(MainChar.Name) ~= nil and game.ReplicatedStorage.PlayersData:FindFirstChild(MainChar.Name.."Data") ~= nil and game.ReplicatedStorage.PlayersData[MainChar.Name.."Data"]:FindFirstChild("Hit") ~= nil then
game.ReplicatedStorage.PlayersData[MainChar.Name.."Data"].Hit.Value += 1
end
FrameWork.Sound(game.ReplicatedStorage.Sounds.Hit:WaitForChild("Punch3"),{Parent = EnemyChar.HumanoidRootPart},2)
if EnemyChar:FindFirstChild("Humanoid") ~= nil and EnemyChar.Humanoid.Health > 0 and EnemyChar:FindFirstChild("HumanoidRootPart") ~= nil and MainChar:FindFirstChild("HumanoidRootPart") ~= nil then
FrameWork.Animation(game.ReplicatedStorage.Animations.Hit:WaitForChild("Recoil4"),EnemyChar.Humanoid)
EnemyChar.HumanoidRootPart.CFrame = CFrame.new(EnemyChar.HumanoidRootPart.Position,MainChar.HumanoidRootPart.Position)
--// Raycasting
local cframetarget = EnemyChar.HumanoidRootPart.CFrame*CFrame.new(0,20,0)
local r1,r2 = EnemyChar.HumanoidRootPart.Position,EnemyChar.HumanoidRootPart.CFrame.upVector*200
local results = workspace:Raycast(r1,r2)
local rot = EnemyChar.HumanoidRootPart.CFrame-EnemyChar.HumanoidRootPart.Position
if results ~= nil and results.Position ~= nil and (results.Position-r1).Magnitude <20 then
cframetarget = CFrame.new(results.Position)*rot
end
FrameWork.CreateTing("BodyPosition",{Parent = MainChar.HumanoidRootPart,MaxForce = Vector3.new(4e4,4e4,4e4),Position = MainChar.HumanoidRootPart.Position + Vector3.new(0,12,0),P = 2e4},1.7)
FrameWork.CreateTing("BodyPosition",{Parent = EnemyChar.HumanoidRootPart,MaxForce = Vector3.new(4e4,4e4,4e4),Position = cframetarget * CFrame.new(0,12,1.5).Position,P = 2e4,Name = "Air_Up_Pos"},1.4)
end
--// Effects //--
if EnemyChar:FindFirstChild("Humanoid") ~= nil and EnemyChar.Humanoid.Health > 0 and EnemyChar:FindFirstChild("HumanoidRootPart") ~= nil and MainChar:FindFirstChild("HumanoidRootPart") ~= nil then
local HitEffect = game.ReplicatedStorage.Effects.HitEffect:WaitForChild("HitEffect"):Clone()
HitEffect.Parent = EnemyChar.HumanoidRootPart
_G.Debris(HitEffect,2)
for i,v in pairs(HitEffect:GetChildren()) do
if v:IsA("ParticleEmitter") then
v:Emit(v:GetAttribute("EmitCount"))
end
end
--// Shockwave
local Ring = game.ReplicatedStorage.Effects:WaitForChild("Ring"):Clone()
Ring.CFrame = MainChar.HumanoidRootPart.CFrame * CFrame.new(0,-2.3,0)
Ring.Parent = workspace.FX
Ring.Size *= 2
game.Debris:AddItem(Ring,3)
Tween:Create(Ring, TweenInfo.new(.45,Enum.EasingStyle.Sine,Enum.EasingDirection.Out), {Size = Ring.Size * 2,Transparency = 1}):Play()
--// Center Thing
local Center = game.ReplicatedStorage.Effects:WaitForChild("Wave"):Clone()
Center.CFrame = MainChar.HumanoidRootPart.CFrame * CFrame.new(0,-2,0)
Center.Parent = workspace.FX
Center.Orientation += Vector3.new(0,0,180)
Center.Size = Vector3.new(0.684, 14.553, 0.456)
game.Debris:AddItem(Center,.45)
Tween:Create(Center, TweenInfo.new(.4,Enum.EasingStyle.Quad,Enum.EasingDirection.Out), {Size = Vector3.new(0.001, 14.553, 0.001),Transparency = 0,CFrame = Center.CFrame * CFrame.new(0,-6,0)}):Play()
end
wait(.45)
FrameWork.Sound(game.ReplicatedStorage.Sounds.Swings:WaitForChild("Swing"),{Parent = EnemyChar.HumanoidRootPart},2)
FrameWork.Animation(game.ReplicatedStorage.Animations.Punches:WaitForChild("Air_Down"),MainChar.Humanoid)
wait(.15)
if game.Players:FindFirstChild(MainChar.Name) ~= nil and game.ReplicatedStorage.PlayersData:FindFirstChild(MainChar.Name.."Data") ~= nil and game.ReplicatedStorage.PlayersData[MainChar.Name.."Data"]:FindFirstChild("Hit") ~= nil then
game.ReplicatedStorage.PlayersData[MainChar.Name.."Data"].Hit.Value += 1
end
--// Effects //--
FrameWork.Sound(game.ReplicatedStorage.Sounds.Hit:WaitForChild("Punch5"),{Parent = EnemyChar.HumanoidRootPart},2)
if EnemyChar:FindFirstChild("Humanoid") ~= nil and EnemyChar.Humanoid.Health > 0 and EnemyChar:FindFirstChild("HumanoidRootPart") ~= nil and MainChar:FindFirstChild("HumanoidRootPart") ~= nil then
local HitEffect = game.ReplicatedStorage.Effects.HitEffect:WaitForChild("HitEffect"):Clone()
HitEffect.Parent = EnemyChar.HumanoidRootPart
_G.Debris(HitEffect,2)
for i,v in pairs(HitEffect:GetChildren()) do
if v:IsA("ParticleEmitter") then
v:Emit(v:GetAttribute("EmitCount"))
end
end
end
FrameWork.Animation(game.ReplicatedStorage.Animations.Hit:WaitForChild("Recoil5"),EnemyChar.Humanoid)
--// Move Enemy Player //--
if EnemyChar.HumanoidRootPart ~= nil and EnemyChar.Humanoid ~= nil and EnemyChar ~= nil then
local root = MainChar.HumanoidRootPart
local vRoot = EnemyChar.HumanoidRootPart
local direction = CFrame.new(root.Position,root.Position+(root.CFrame.lookVector*12)+(root.CFrame.upVector*-10) ).lookVector*300
local start= root.Position
local params = RaycastParams.new()
params.FilterDescendantsInstances = {MainChar,workspace.FX, EnemyChar}
params.FilterType = Enum.RaycastFilterType.Blacklist
local results = workspace:Raycast(start,direction,params)
if results ~= nil and results.Instance ~= nil and (results.Position-start).Magnitude <= 300 then
if vRoot:FindFirstChild("Air_Up_Pos") ~= nil then
vRoot:FindFirstChild("Air_Up_Pos"):Destroy()
end
local cf = CFrame.new(results.Position,results.Position+results.Normal)
local targetcf = cf*CFrame.new(0,0,-.5)
local x,y,z = targetcf:ToOrientation()
local rot = vRoot.CFrame -vRoot.Position
local cframe = CFrame.new(targetcf.p)*rot
local point2 = CFrame.new(results.Position,vRoot.Orientation)*CFrame.new(0,4.5,0)
Tween:Create(vRoot,TweenInfo.new(.15,Enum.EasingStyle.Quad,Enum.EasingDirection.Out),{CFrame = point2}):Play()
--print("Damaged")
wait(.07)
FrameWork.GroundSlam(vRoot,CFrame.new(results.Position)*CFrame.new(0,4.5,0),MainChar)
EnemyChar.Humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
else
FrameWork.CreateTing("BodyVelocity",{Parent = vRoot,Velocity = direction, MaxForce = 4e4,4e4,4e4},.25)
end
end
end
end
--// Hitbox Function Client //--
function FrameWork.Hitbox(Player,root,detectiondistancefromrootpart,hitboxsize)
local point = root.CFrame*CFrame.new(0,0,-detectiondistancefromrootpart)
local region = Modules.Hitbox.new(point,Vector3.new(hitboxsize,hitboxsize,hitboxsize))
local parts = region:FindPartsInRegion3WithIgnoreList({Player.Character},100)
local doing = false
for i,v in pairs(parts) do
local victim = v.Parent
if victim ~= nil and root:IsDescendantOf(victim) == false and doing == false and victim:FindFirstChild("Humanoid") ~= nil and victim:FindFirstChild("HumanoidRootPart") ~= nil and victim.Humanoid.Health >0 and victim.Humanoid:GetState() ~= Enum.HumanoidStateType.Dead then
doing = true
local cos = victim.HumanoidRootPart.CFrame.lookVector:Dot(CFrame.new(root.Position,victim.HumanoidRootPart.Position).lookVector)
if victim:FindFirstChild("Blocking") and cos > .7 then --// Blocking But Got Hit From Behind :) //--
FrameWork.Combat("Hit",Player.Character,victim)
elseif victim:FindFirstChild("Blocking") and not victim.Blocking:FindFirstChild("Perfect Block") then --// Normal Block //--
FrameWork.Combat("Block",Player.Character,victim)
elseif victim:FindFirstChild("Blocking") and victim.Blocking:FindFirstChild("Perfect Block") then --// Perfect block //--
FrameWork.Combat("PerfectBlock",Player.Character,victim)
else --// Normal Hit //--
FrameWork.Combat("Hit",Player.Character,victim)
end
end
end
end
return FrameWork
FrameWorkServer modulescript
local FrameWork = {}
--// Variables //--
local Modules = {
["Hitbox"] = require(game.ReplicatedStorage.Modules:WaitForChild("Hitbox"))
}
local ClientR = game.ReplicatedStorage.Remotes:WaitForChild("HandlerFireClient")
--// Global Functions //--
function _G.Debris(Thing,Time)
if Time ~= nil and Thing ~= nil then
game.Debris:AddItem(Thing,Time)
end
end
--// Normal Functions //--
function FrameWork.CreateVariable(Type,Properties,DebrisTime)
if Type ~= nil and Properties ~= nil then
local Thing = Instance.new(Type)
--// Properties //--
for i,v in pairs(Properties) do
Thing[i] = v
end
if DebrisTime then
_G.Debris(Thing,DebrisTime)
end
end
end
function FrameWork.Unblock(Char)
if Char ~= nil and Char:FindFirstChild("Blocking") ~= nil and Char:FindFirstChild("Humanoid") ~= nil then
for i,v in pairs(Char:GetChildren()) do
if v.Name == "Blocking" then
v:Destroy()
end
end
ClientR:FireAllClients("FrameWork","Unblock",Char.Humanoid)
end
end
--// Damage Fuinction
function FrameWork.Damage(Damage,Hum,Humrp)
if Hum and Damage ~= nil then
Hum:TakeDamage(Damage)
if Humrp ~= nil then
ClientR:FireAllClients("FrameWork","DamageTing",Humrp,Damage)
end
end
end
--// Sword Functions //--
function FrameWork.Sheathe(plr,SwordName)
if plr ~= nil and SwordName ~= nil and game.ReplicatedStorage.PlayersData:FindFirstChild(plr.Name.."Data") ~= nil then
game.ReplicatedStorage.PlayersData[plr.Name.."Data"].CurrSword:SetAttribute("Equipped",false)
end
end
function FrameWork.Unsheathe(plr,SwordName)
if plr ~= nil and SwordName ~= nil and game.ReplicatedStorage.PlayersData:FindFirstChild(plr.Name.."Data") ~= nil then
game.ReplicatedStorage.PlayersData[plr.Name.."Data"].CurrSword:SetAttribute("Equipped",true)
end
end
--// Hitbox Function
function FrameWork.Hitbox(Player,root,detectiondistancefromrootpart,hitboxsize,Count,Type)
if Player:IsA("Model") and Player.Parent == game:GetService("Workspace").Dummies then
Player = {Character = Player}
end
local point = root.CFrame*CFrame.new(0,0,-detectiondistancefromrootpart)
local region = Modules.Hitbox.new(point,Vector3.new(hitboxsize,hitboxsize,hitboxsize))
local parts = region:FindPartsInRegion3WithIgnoreList({Player.Character},100)
local doing = false
for i,v in pairs(parts) do
local victim = v.Parent
if victim ~= nil and root:IsDescendantOf(victim) == false and doing == false and victim:FindFirstChild("Humanoid") ~= nil and victim:FindFirstChild("HumanoidRootPart") ~= nil and victim.Humanoid.Health >0 and victim.Humanoid:GetState() ~= Enum.HumanoidStateType.Dead and Player ~= nil and Player.Character ~= nil then
doing = true
local cos = victim.HumanoidRootPart.CFrame.lookVector:Dot(CFrame.new(root.Position,victim.HumanoidRootPart.Position).lookVector)
if Count ~= "Air_Up" and Count ~= "Air_Down" and Type == nil then
if victim:FindFirstChild("Blocking") and cos > .7 then --// Blocking But Got Hit From Behind :) //--
ClientR:FireAllClients("FrameWork","Combat","Hit",Player.Character,victim,Count)
if game.Players:FindFirstChild(victim.Name) ~= nil then
local enemyplr = game.Players:FindFirstChild(victim.Name)
ClientR:FireClient(enemyplr,"FrameWork","CamShake","Hit",victim.HumanoidRootPart)
end
FrameWork.Unblock(victim)
FrameWork.Damage(5,victim.Humanoid,victim.HumanoidRootPart)
FrameWork.CreateVariable("BoolValue",{Parent = victim,Name = "Stun"},.35)
elseif victim:FindFirstChild("Blocking") and not victim.Blocking:FindFirstChild("PB") and Count ~= 5 then --// Normal Block //--
ClientR:FireAllClients("FrameWork","Combat","Block",Player.Character,victim,Count)
ClientR:FireAllClients("FrameWork","DamageTing",victim.HumanoidRootPart,"Blocking!","TextT",Color3.fromRGB(71, 135, 255))
elseif victim:FindFirstChild("Blocking") and not victim.Blocking:FindFirstChild("PB") and Count == 5 then --// Block Break //--
if game.Players:FindFirstChild(victim.Name) ~= nil then
local enemyplr = game.Players:FindFirstChild(victim.Name)
ClientR:FireClient(enemyplr,"FrameWork","CamShake","Hit",victim.HumanoidRootPart)
end
FrameWork.Unblock(victim)
ClientR:FireAllClients("FrameWork","Combat","BlockBroken",Player.Character,victim)
FrameWork.Damage(1,victim.Humanoid,victim.HumanoidRootPart)
FrameWork.CreateVariable("BoolValue",{Parent = victim,Name = "Stun"},2)
ClientR:FireAllClients("FrameWork","DamageTing",victim.HumanoidRootPart,"Block Broken!","TextT",Color3.fromRGB(255, 255, 137))
elseif victim:FindFirstChild("Blocking") and victim.Blocking:FindFirstChild("PB") then --// Perfect block //--
ClientR:FireAllClients("FrameWork","Combat","PerfectBlock",Player.Character,victim)
FrameWork.CreateVariable("BoolValue",{Parent = Player.Character,Name = "Stun"},2)
ClientR:FireClient(Player,"FrameWork","CamShake","Hit",root)
ClientR:FireAllClients("FrameWork","DamageTing",victim.HumanoidRootPart,"Perfect Block!","TextT",Color3.fromRGB(136, 32, 255))
else --// Normal Hit //--
if game.Players:FindFirstChild(victim.Name) ~= nil then
local enemyplr = game.Players:FindFirstChild(victim.Name)
ClientR:FireClient(enemyplr,"FrameWork","CamShake","Hit",victim.HumanoidRootPart)
end
ClientR:FireAllClients("FrameWork","Combat","Hit",Player.Character,victim,Count)
FrameWork.CreateVariable("BoolValue",{Parent = victim,Name = "Stun"},.35)
if Count == 5 then
FrameWork.Damage(7.5,victim.Humanoid,victim.HumanoidRootPart)
elseif Count ~= 5 then
FrameWork.Damage(5,victim.Humanoid,victim.HumanoidRootPart)
end
end
elseif Count ~= "Air_Up" and Count ~= "Air_Down" and Type == "Sword" then
if victim:FindFirstChild("Blocking") and cos > .7 then --// Blocking But Got Hit From Behind :) //--
ClientR:FireAllClients("FrameWork","Combat","SwordHit",Player.Character,victim,Count)
if game.Players:FindFirstChild(victim.Name) ~= nil then
local enemyplr = game.Players:FindFirstChild(victim.Name)
ClientR:FireClient(enemyplr,"FrameWork","CamShake","Hit",victim.HumanoidRootPart)
end
FrameWork.Unblock(victim)
FrameWork.Damage(5,victim.Humanoid,victim.HumanoidRootPart)
FrameWork.CreateVariable("BoolValue",{Parent = victim,Name = "Stun"},.35)
elseif victim:FindFirstChild("Blocking") and not victim.Blocking:FindFirstChild("PB") and Count ~= 5 then --// Normal Block //--
if game.ReplicatedStorage.PlayersData:FindFirstChild(victim.Name.."Data") ~= nil and game.ReplicatedStorage.PlayersData[victim.Name.."Data"].CurrSword:GetAttribute("Equipped") == true then --// If Player has a Sword //--
ClientR:FireAllClients("FrameWork","Combat","BlockSword",Player.Character,victim,Count)
else --// Doesnt Have a Sword //--
ClientR:FireAllClients("FrameWork","Combat","Block",Player.Character,victim,Count)
end
ClientR:FireAllClients("FrameWork","DamageTing",victim.HumanoidRootPart,"Blocking!","TextT",Color3.fromRGB(71, 135, 255))
elseif victim:FindFirstChild("Blocking") and not victim.Blocking:FindFirstChild("PB") and Count == 5 then --// Block Break //--
if game.Players:FindFirstChild(victim.Name) ~= nil then
local enemyplr = game.Players:FindFirstChild(victim.Name)
ClientR:FireClient(enemyplr,"FrameWork","CamShake","Hit",victim.HumanoidRootPart)
end
FrameWork.Unblock(victim)
ClientR:FireAllClients("FrameWork","Combat","BlockBroken",Player.Character,victim)
FrameWork.Damage(7.5,victim.Humanoid,victim.HumanoidRootPart)
FrameWork.CreateVariable("BoolValue",{Parent = victim,Name = "Stun"},2)
ClientR:FireAllClients("FrameWork","DamageTing",victim.HumanoidRootPart,"Block Broken!","TextT",Color3.fromRGB(255, 255, 137))
elseif victim:FindFirstChild("Blocking") and victim.Blocking:FindFirstChild("PB") then --// Perfect block //--
ClientR:FireAllClients("FrameWork","Combat","PerfectBlock",Player.Character,victim)
FrameWork.CreateVariable("BoolValue",{Parent = Player.Character,Name = "Stun"},2)
ClientR:FireClient(Player,"FrameWork","CamShake","Hit",root)
ClientR:FireAllClients("FrameWork","DamageTing",victim.HumanoidRootPart,"Perfect Block!","TextT",Color3.fromRGB(136, 32, 255))
else --// Normal Hit //--
if game.Players:FindFirstChild(victim.Name) ~= nil then
local enemyplr = game.Players:FindFirstChild(victim.Name)
ClientR:FireClient(enemyplr,"FrameWork","CamShake","Hit",victim.HumanoidRootPart)
end
ClientR:FireAllClients("FrameWork","Combat","SwordHit",Player.Character,victim,Count)
FrameWork.CreateVariable("BoolValue",{Parent = victim,Name = "Stun"},.35)
FrameWork.Damage(8.5,victim.Humanoid,victim.HumanoidRootPart)
end
else
if Count == "Air_Up" and Type == nil then
if victim:FindFirstChild("Blocking") and cos > .7 then --// Blocking But Got Hit From Behind :) //--
ClientR:FireAllClients("FrameWork","Combat","Air_Up",Player.Character,victim)
if game.Players:FindFirstChild(victim.Name) ~= nil then
local enemyplr = game.Players:FindFirstChild(victim.Name)
ClientR:FireClient(enemyplr,"FrameWork","CamShake","Hit",victim.HumanoidRootPart)
end
FrameWork.Unblock(victim)
FrameWork.Damage(5,victim.Humanoid,victim.HumanoidRootPart)
FrameWork.CreateVariable("BoolValue",{Parent = victim,Name = "Stun"},2)
elseif victim:FindFirstChild("Blocking") and not victim.Blocking:FindFirstChild("PB") then --// Block Break //--
if game.Players:FindFirstChild(victim.Name) ~= nil then
local enemyplr = game.Players:FindFirstChild(victim.Name)
ClientR:FireClient(enemyplr,"FrameWork","CamShake","Hit",victim.HumanoidRootPart)
end
FrameWork.Unblock(victim)
ClientR:FireAllClients("FrameWork","Combat","BlockBroken",Player.Character,victim)
FrameWork.Damage(1,victim.Humanoid,victim.HumanoidRootPart)
FrameWork.CreateVariable("BoolValue",{Parent = victim,Name = "Stun"},2)
ClientR:FireAllClients("FrameWork","DamageTing",victim.HumanoidRootPart,"Block Broken!","TextT",Color3.fromRGB(255, 255, 137))
elseif victim:FindFirstChild("Blocking") and victim.Blocking:FindFirstChild("PB") then --// Perfect block //--
ClientR:FireAllClients("FrameWork","Combat","PerfectBlock",Player.Character,victim)
FrameWork.CreateVariable("BoolValue",{Parent = Player.Character,Name = "Stun"},2)
ClientR:FireClient(Player,"FrameWork","CamShake","Hit",root)
ClientR:FireAllClients("FrameWork","DamageTing",victim.HumanoidRootPart,"Perfect Block!","TextT",Color3.fromRGB(136, 32, 255))
else
ClientR:FireAllClients("FrameWork","Combat","Air_Up",Player.Character,victim)
if game.Players:FindFirstChild(victim.Name) ~= nil then
local enemyplr = game.Players:FindFirstChild(victim.Name)
ClientR:FireClient(enemyplr,"FrameWork","CamShake","Hit",victim.HumanoidRootPart)
end
FrameWork.Damage(8.5,victim.Humanoid,victim.HumanoidRootPart)
FrameWork.CreateVariable("BoolValue",{Parent = victim,Name = "Stun"},2)
end
end
end
end
end
end
return FrameWork
yes i did had this problem but after some time it disapeared (sorry my english is not good)
Same thing that has happened to me. I would recommend restarting studio, redownloading studio, and/or turning off/on team create.
check if StarterCharacter exist inside the StarterPlayer. if it does, destroy it
There’s scripts inside there… I don’t know about deleting it.
I don’t think you can remove any default roblox folders.
Not the folder, a model named StarterCharacter.
I don’t have a startercharacter model.
sorry for bumping, i’ve experienced the same issue. my character spawns as r15 when my game settings is r6. i have no scripts that changes the character type, i think it’s a studio bug but i cant post anything on #bug-reports. does anyone have an explanation?
if you inserted a freemodel, there might me a script to force the character to load in r15
Sorry for being so late and bumping haha but im having the same problem, if someone haves a solution i would love to hear it as it has became a very annoying problem, Having to reset so it fixes