function myfunction()
game.ServerStorage.Bullet:Clone() game.ServerStorage.Clone = game.Workspace script.Parent.fire:Play() end script.Parent.ClickDetector.MouseClick:connect(myfunction)
Edit:problem fixed.
You need to put the clone under a variable in order for it to work. Here's how you do it.
local bullet= game.ServerStorage.Bullet local bulletClone= bullet:Clone() bulletClone.Parent= game.Workspace --the rest of your code goes here
I hope that helped.
you need to set the parent of the clone to the workspace therefore you will need to do it like this
local ServerStorage = game:GetService("ServerStorage") local function myfunction() local bulletShot = ServerStorage.Bullet:Clone() bulletShot.Parent = game.Workspace script.Parent.fire:Play() end) script.Parent.ClickDetector.MouseButton1Click:Connect(myfunction)
I think this would work. If not i'm sorry i'm not extremely experienced. If it does please make this question answered