I’m trying to make my script change the grip orientation of the tool when the tool is activated and I keep getting an error that says “Orientation is not a valid member of CFrame” Line:24
I’m not sure what i’m doing wrong or what I can do to fix the problem
local Tool = script.Parent
local ToolModule = require(game.ReplicatedStorage:WaitForChild("Tools"))
local ClassesModule = require(game.ReplicatedStorage:WaitForChild("Classes"))
local BackpackModule = require(game.ReplicatedStorage:WaitForChild("Backpacks"))
local AuraModule = require(game.ReplicatedStorage:WaitForChild("Auras"))
local Animation = Instance.new("Animation")
Animation.AnimationId = ("rbxassetid://"..ToolModule[Tool.Name].AnimationID)
local track
local cooldown = false
Tool.Activated:Connect(function(Player)
local Player = game.Players:GetPlayerFromCharacter(Tool.Parent)
if cooldown == false then
cooldown = true
track = script.Parent.Parent:WaitForChild("Humanoid"):LoadAnimation(Animation)
track.Priority = Enum.AnimationPriority.Action
track:Play()
local OrigninalA = Tool.Grip.Position
local OrigninalB = Tool.Grip.Orientation
wait(0.3)
Tool.Grip.Position = Vector3.new(ToolModule[Tool.Name].GripPO)
Tool.Grip.Orientation = Vector3.new(ToolModule[Tool.Name].GripOR)
Tool.Brush.ParticleEmitter.Enabled = true
wait(0.4)
Tool.Brush.ParticleEmitter.Enabled = false
wait(1.6)
Tool.Grip.Position = Vector3.new(OrigninalA)
Tool.Grip.Orientation = Vector3.new(OrigninalB)
local Gain = ToolModule[Tool.Name].BaseGain
local ClassMulti = ClassesModule[Player.leaderstats.Class.Value].Multiplier
local AuraMulti = AuraModule[Player.playerstats.Aura.Value].Multiplier
if Player.playerstats.BackpackType.Value == "Infinite" then
Player.playerstats.Backpack.Value = Player.playerstats.Backpack.Value + Gain * AuraMulti * ClassMulti
else
if Player.playerstats.Backpack.Value <= BackpackModule[Player.playerstats.BackpackType.Value].Storage - 0.5 then
Player.playerstats.Backpack.Value = Player.playerstats.Backpack.Value + Gain * AuraMulti * ClassMulti
else
Player.playerstats.Backpack.Value = BackpackModule[Player.playerstats.BackpackType.Value].Storage
print("Backpack Full")
end
end
cooldown = false
else
--Cooldown
end
end)