#Angles not working

67 messages · Page 1 of 1 (latest)

unborn folio
#

I'm trying to orientate a part according to the direction the player is looking and make it tilt 45 degrees forward, but it doesn't seem to work. It's orientated properly but it just doesn't tilt forward...

fallen turret
unborn folio
#

I moved the anchored statement after the angles one but

#

nothing changed

fallen turret
unborn folio
fallen turret
unborn folio
#

Like this?

#

It didn't work 😭

fallen turret
#

no i mean only rockboost.CFrame * Cframe.Angles not rockboost.Cframe = rockboost.Cframe * CFrame.Angles

nocturne owlBOT
#

studio** You are now Level 2! **studio

unborn folio
#

oh so like

#

no equals

fallen turret
#

ye

unborn folio
#

but then

#

it'd just be invalid or something

#

like its red

#

like it looks like this

#

I already tried like

#

every mathematical symbol

fallen turret
#

send the script in text ima copy it into my studio and try it

unborn folio
#

mk

#

I'll even send u the client remote as well

fallen turret
#

ai

unborn folio
#

Client

nocturne owlBOT
#

studio** You are now Level 3! **studio

fallen turret
#

in text please i dont want to write all that one by one

unborn folio
#

fair

#

if input.KeyCode == Enum.KeyCode.Q and Bending.Value == "Earth" and moveInUse == false and earthBoost == false and EarthBending then
local currentState = humanoid:GetState()
if currentState == Enum.HumanoidStateType.Freefall then return end

    if currentState == Enum.HumanoidStateType.Running and not Crouch then -- This is the one that triggers the server script that needs to be in orientation
        local direction = character.HumanoidRootPart.CFrame.LookVector
        game.ReplicatedStorage.BendingEvents.Earth.EarthBoostUp:FireServer()
        wait(0.2)
        character.HumanoidRootPart.AssemblyLinearVelocity =  (direction * 140) + Vector3.new(0, 100, 0)
        print ("Forward Up")
    elseif currentState == Enum.HumanoidStateType.Running and Crouch then
        Crouch = false
        earthBoost = true
        moveInUse = true
        game.ReplicatedStorage.BendingEvents.Earth.EarthBoostUp:FireServer()
        wait(0.2)
        character.HumanoidRootPart.AssemblyLinearVelocity = Vector3.new(0, 150, 0)
        moveInUse = false
        wait(6)
        print ("Boost Ready")
        earthBoost = false
    end
end
#

obviously UIS was put before that

#

that's the client sided one

#

Here's the server one that needs to be oriented

game.ReplicatedStorage.BendingEvents.Earth.EarthBoostForward.OnServerEvent:Connect(function(player)
local character = player.Character or player.CharacterAdded:Wait()
local humRoot = character:WaitForChild("HumanoidRootPart")
local hum = character:WaitForChild("Humanoid")
local originalWalk = hum.WalkSpeed
local TweenService = game:GetService("TweenService")
local Remote = game.ReplicatedStorage.ReturnEvents.EarthWallReturn
wait(0.2)

if hum.Health > 0 then
    local rockBoost = Instance.new("Part", workspace)
    rockBoost.BrickColor = BrickColor.new("Medium brown")
    rockBoost.Material = Enum.Material.Ground
    rockBoost.Size = Vector3.new(5,1,5)

    local Orientation = humRoot.CFrame  - humRoot.Position
    local NewPos = humRoot.Position + Vector3.new(0, -5, 0)
    rockBoost.CFrame = Orientation
    rockBoost.CFrame = rockBoost.CFrame + CFrame.Angles(math.rad(-45), 0, 0)
    rockBoost.Position = NewPos
    rockBoost.Anchored = true

    local info = TweenInfo.new(
        0.4,
        Enum.EasingStyle.Exponential,
        Enum.EasingDirection.Out,
        0,
        false
    )

    local properties = {
        ["Size"] = rockBoost.Size + Vector3.new(0, 25, 0)

    }

    local tween = TweenService:Create(rockBoost, info, properties)
    tween:Play()
    wait(0.1)
    hum.WalkSpeed = originalWalk
    Remote:FireClient(player, rockBoost)
end

end)

fallen turret
#

you wanted the rock to roate like this right?

#

when you made this variable

#

did you want the rock to spawn under the player?

#

@unborn folio

unborn folio
#

yea

unborn folio
#

Did it spawn under?

fallen turret
#

nah it spawned on the player spawn

#

but ima make it spawn under for you

unborn folio
#

maybe where its positioned is messing it up

fallen turret
#

try this for now

#

if hum.Health > 0 then
local rockBoost = Instance.new("Part", workspace)
rockBoost.BrickColor = BrickColor.new("Medium brown")
rockBoost.Material = Enum.Material.Ground
rockBoost.Size = Vector3.new(5,1,5)

    rockBoost.CFrame = CFrame.new(humRoot.Position + humRoot.CFrame.LookVector * Vector3.new(0, -10, 0))
    rockBoost.Orientation = rockBoost.Orientation + Vector3.new(0, 0, 45)
    
    rockBoost.Anchored = true
#

the rocks keep going into one direction ima try to fix that rq

fallen turret
#

alr cuz @unborn folio

#

rockBoost.CanCollide = false

    rockBoost.CFrame = humRoot.CFrame + humRoot.CFrame.LookVector
    rockBoost.Orientation += Vector3.new(180, 90, 45)
    
    rockBoost.CanCollide = true
    
    rockBoost.Anchored = true
#

this is the script

#

first you uncollide it so you can rotate it freely and after the rotations are done you collide it and anchor it

unborn folio
#

oh was it because of the canCollide?

#

So it was stopping the rotating?

fallen turret
#

nah you can rotate with collide on but you were spawning the part underground with the collide on

#

if a part is inside a part and you try to rotate it then it starts glitchin

unborn folio
#

Wait can you send the total script?

#

Because idk where to put iot

fallen turret
#

game.ReplicatedStorage.Bending.OnServerEvent:Connect(function(player)
local character = player.Character or player.CharacterAdded:Wait()
local humRoot = character:WaitForChild("HumanoidRootPart")
local hum = character:WaitForChild("Humanoid")
local originalWalk = hum.WalkSpeed
local TweenService = game:GetService("TweenService")
wait(0.2)

if hum.Health > 0 then
    local rockBoost = Instance.new("Part", workspace)
    rockBoost.BrickColor = BrickColor.new("Medium brown")
    rockBoost.Material = Enum.Material.Ground
    rockBoost.Size = Vector3.new(5,1,5)
    rockBoost.CanCollide = false
    
    rockBoost.CFrame = humRoot.CFrame + humRoot.CFrame.LookVector
    rockBoost.Orientation += Vector3.new(180, 90, 45)
    
    rockBoost.CanCollide = true
    
    rockBoost.Anchored = true

    local info = TweenInfo.new(
        0.4,
        Enum.EasingStyle.Exponential,
        Enum.EasingDirection.Out,
        0,
        false
    )

    local properties = {
        ["Size"] = rockBoost.Size + Vector3.new(0, 25, 0)

    }

    local tween = TweenService:Create(rockBoost, info, properties)
    tween:Play()
    wait(0.1)
    hum.WalkSpeed = originalWalk
end

end)

#

paste all of this

#

on the server script

unborn folio
#

it didn't work for me wtf 😭

#

it's fine I can think of another solution

#

thank you for trying though...

fallen turret
unborn folio
#

I just found out the reason it wasn't working was because...

#

And you won't like this...