I Have My script working fine! but when I move my Script to my main game the CFrame of my Cloned Tool is not changing!

Does anyone have any idea? of what is happening or why this is happening ( I am new dev )

**One of the games i transfered the script to works perfectly **

External Media

** In my main Game Not Changing the CFrame**

External Media

Local Script

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local Player = game.Players.LocalPlayer
local Humanoid = Player.Character:FindFirstChild("Humanoid")
local BackPack = Player.Backpack
local Animation = game.StarterPlayer.StarterPlayerScripts.AnimationFile.ThrowAnim
local AnimationHolding = game.StarterPlayer.StarterPlayerScripts.AnimationFile.HoldingAnim
local GravityRock = ReplicatedStorage.Items:FindFirstChild("Gravity")
local RemoteThrow = ReplicatedStorage.Assest:FindFirstChild("Remotes").ThrowEvent
local Mouser = Player:GetMouse()
local Animations = Humanoid:LoadAnimation(Animation)

--GravityRockCloning
local GravityRockClone = GravityRock:Clone()
GravityRockClone.Parent = BackPack
--CoolDown
local CoolDown = true
--MouseClickEventStart
Mouser.Button1Up:Connect(function()
	task.wait()
	GravityRockClone.Equipped:Connect(function()
		if (CoolDown == true) then
			Animations:Play()
			CoolDown = false
			task.wait(0.2)
             print("I passed the Condition that you set")
			RemoteThrow:FireServer(Mouser.Hit.LookVector)
			GravityRockClone.Parent = nil
			task.wait()
			GravityRockClone.Parent = BackPack
			task.wait(3)
			CoolDown = true
		end
	end)
end)
GravityRockClone.Unequipped:Connect(function()

end)

** Server Script **

task.wait()
local Players = game:GetService("Players")
local ReplicatedStoage = game:GetService("ReplicatedStorage")
local RemoteThrow = ReplicatedStoage.Assest:FindFirstChild("Remotes").ThrowEvent
local GravityRock = ReplicatedStoage.Items:FindFirstChild("Gravity").Handle
local Debris = game:GetService("Debris")
local CoolDown = true
--Speed
Speed = 150

RemoteThrow.OnServerEvent:Connect(function(Player, Mouse)
	local Character = Player.Character or Player.CharacterAdded:Wait()
	local HumanoidRootPart = Character:FindFirstChild("HumanoidRootPart")
	local Humanoid = Character:FindFirstChildWhichIsA("Humanoid")
	local CloneGravityRock = GravityRock:Clone()
	local Mouse = Mouse
	local BodyVelocity = Instance.new("BodyVelocity")
	BodyVelocity.Parent = CloneGravityRock
	CloneGravityRock.CFrame = HumanoidRootPart.CFrame * CFrame.new(4,2,0)
	BodyVelocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
	BodyVelocity.Velocity = Mouse * Speed
	CloneGravityRock.Parent = workspace
	CloneGravityRock.Anchored = false
	print(CloneGravityRock.CFrame)
	for Index, Value in pairs(CloneGravityRock:GetDescendants()) do
		if Value:IsA("MeshPart") or Value:IsA("Part") then
			Value.Anchored = false
		end
	end
	CloneGravityRock.CanCollide = false
	---Touch Event --
	CloneGravityRock.Touched:Connect(function(hit)
		if hit.Parent ~= Character then
			CloneGravityRock.CanCollide = true
			BodyVelocity.Velocity = Vector3.zero
			BodyVelocity.MaxForce = Vector3.zero
			CloneGravityRock:GetMass(0) 
			CloneGravityRock.Shape = "Block"
			CloneGravityRock.Size = Vector3.zero
		end
		if hit.Parent~= Character and (CoolDown == true) and hit.Parent:FindFirstChildWhichIsA("Humanoid") then
			CoolDown = false
			local Humanoid = hit.Parent:FindFirstChildWhichIsA("Humanoid")
			Humanoid:TakeDamage(150)
		    CloneGravityRock:GetMass(0) 
			CloneGravityRock.Shape = "Block"
			CloneGravityRock.Size = Vector3.zero
			print("I Damaged")
		end
		print("I am touched")
	end)
	CoolDown = true
	Humanoid.WalkSpeed = 0
	wait(1)
	Humanoid.WalkSpeed = 20
	--Debris:AddItem(CloneGravityRock, 3)
end)

Found the problem, It was the Rotation of the Tool On the player grap* Make sure the X axis facing forward.

And here is a free throw system lel

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.