Tween Isn't working

I am trying to Fire a event from a local script to script back to the local script, the RisingNuke() works But the RotationNuke() Doesn’t Although the tween script is perfectly fine?
Here is the local script and script
local Script:

local Player = game.Players.LocalPlayer
local NukeButton = Player.PlayerGui:WaitForChild("Nuke").TextButton
local DP = game:GetService("MarketplaceService")
local DPID = 1266648780
local RS = game:GetService("ReplicatedStorage")
local Tween = game:GetService("TweenService")
local Nuke = game.Workspace.Missile
local RR = RS.RisingRocket
local ROF = RS.RotationOfNuke

local function RotationNuke()
	local InfoOfNuke1 = TweenInfo.new(
		6,
		Enum.EasingStyle.Sine,
		Enum.EasingDirection.Out,
		0,
		false
	)
	local TableOfNuke1 = {
		Orientation = Vector3.new(90, 0, 0)
	}
	local Rotation = Tween:Create(Nuke, InfoOfNuke1, TableOfNuke1)
	Rotation:Play()
end
local function RisingNuke()	
	local InfoOfNuke = TweenInfo.new(
		15,
		Enum.EasingStyle.Sine,
		Enum.EasingDirection.Out,
		0,
		false
	)	
	local TableOfNuke = {
		Position = Vector3.new(57.1, 698.35, 1.3)
	}
	local Launching = Tween:Create(Nuke, InfoOfNuke, TableOfNuke)
	Launching:Play()
end

NukeButton.MouseButton1Up:Connect(function()
	DP:PromptProductPurchase(Player, DPID)
	RR:FireServer()
	ROF:FireServer()
end)

RR.OnClientEvent:Connect(function()
	RisingNuke()
end)

ROF.OnClientEvent:Connect(function()
	RotationNuke()
end)

Script:

local RS = game:GetService("ReplicatedStorage")
local DP = game:GetService("MarketplaceService")
local DPID = 1266648780
local RR = RS.RisingRocket
local ROF = RS.RotationOfNuke

DP.ProcessReceipt = function(receiptInfo)
	local Players = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
	if not Players then
		return Enum.ProductPurchaseDecision.NotProcessedYet
	end
	if receiptInfo.ProductId == DPID then
		RR:FireAllClients()
		wait(20)
		ROF:FireAllClients()
	end
	return Enum.ProductPurchaseDecision.PurchaseGranted
end


I don’t think you need to use Event:FireServer() in the button click function. Also, are you sure that this function does not work? Have you used Debug to analyze the code? Did you remove wait(20) and see instant work?

1 Like

It works, The orientation had to be -90 since it was already 90, Thanks for the reply tho!

Glad to hear that you solved your problem!

2 Likes