Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Wont clone into the set place?

Read the comments on your answer

1 answer

✓ Accepted answer

If you want simplicity, you can just set the nuke CFrame!

In your description, you said you place a part in the place where you want it to spawn. That means you can just set the nuke CFrame to the part CFrame.

local part = -- your part 
local nuke = -- your nuke

nuke.CFrame = part.CFrame -- sets your nuke CFrame to the part CFrame

Full code from your previous question:

local ReplicatedStorage = game:GetService("ReplicatedStorage")

local remoteEvent = ReplicatedStorage:WaitForChild("RemoteEvent")

local part = -- your part here

remoteEvent.OnClientEvent:Connect(function()
	local Nuke = game.Lighting.Nuke:Clone()
	Nuke.Parent = game.Workspace
	
	Nuke.CFrame = part.CFrame
end)

Since you asked for cooldown usage, although it is not needed since your code is client sided!

Code from your previous question ( LocalScript to prompt the dev product )

local Id = 1147482990
local MPS = game:GetService("MarketplaceService")
local Player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:Connect(function()
	if game.Workspace:FindFirstChild("Nuke") then
		-- do nothing because a nuke is currently being launched
		-- you can tell the player if a nuke is currently being launched
	else
		MPS:PromptProductPurchase(Player, Id) -- prompts the dev product
	end
end)

9 comments

0

What about the debounce?

0

It's used to prevent multiple nuke being launched at the same time

0

Actually nevermind. You don't need debounce because your nuke is client sided, correct?

0

There, I added a simple cooldown/debounce

0

You also need to destroy the nuke after a specific amount of time in your nuke clone code to enable the dev product prompt again

0

Ill just do the destroy nuke thing and cframe as long as it actually clones/spawns the nuke then im fine with it

0

Basically now, the nuke spawns it is a normal nuke that flies when a button is pressed. So it spawns the nuke and button but when I click the button the nuke doesnt work?

0

It still doesnt work, it fixes one thing but then breaks another. If you want you can mess around with it in your spare time join my group TheBlooner and Ill rank you so you can edit a start place which has the components and so on.

0

Im not trying to advertise my group its just for the permission and you can leave it straight after

This discussion is preserved as it was. New answers, comments, and votes are closed.