You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
A throwable snowball object that when you click anywhere with it, a clown is thrown.
What is the issue? Include screenshots / videos if possible!
Whats on the title, it just does not work.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Print() to check where its not working, changing values, etc. Yes.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
game:GetService("ReplicatedStorage").Throw.OnServerEvent:Connect(function(player)
local clone=script.Parent:Clone()
clone.Parent=game.Workspace
clone.Position=script.Parent.Position
clone.Rotation=script.Parent.Rotation
local bv=Instance.new("BodyVelocity")
bv.Parent=clone
bv.Velocity=player.Character.HumanoidRootPart.CFrame.LookVector
end)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.
I really need more context here. I have a feeling the script isn’t working because it’s not placed in the correct service. Could you send us a screenshot of your Explorer?
Also, this line:
local clone=script.Parent:Clone()
You’re cloning the parent of the script, and you parent it to the workspace, so that will lead to an infinite loop, if you aren’t aware. Assuming this is the only code in the script.
Another thing,
clone.Rotation=script.Parent.Rotation
This will not work. .Rotation. is read only, you can’t modify it. Try using CFrame instead.
And you also should not use BodyVelocity, as it is deprecated. Use LinearVelocity instead.
And on top of all that, you may need to increase the velocity of this line:
local m=game.Players.LocalPlayer:GetMouse()
m.Button1Down:Connect(function()
local t=script.Parent.Parent
local tt=m.Target
if tt and game.Players:GetPlayerFromCharacter(tt.Parent) and t.Equipped then
game:GetService("ReplicatedStorage").Throw:FireServer()
end
end)