#clone wrong direction
1 messages · Page 1 of 1 (latest)
proximityprompt = script.Parent
Ammovalue = script.Parent.Parent.Parent.Value
local clone = game.Workspace.CowAmmo
local speed = 500
proximityprompt.Triggered:Connect(function()
local part = clone:Clone()
part.Parent = workspace.BulletFolder
part.Position = proximityprompt.Parent.Position
part.Velocity = part.CFrame.LookVector * speed
Ammovalue.Value = Ammovalue.Value - 1
if Ammovalue.Value == 0 then
proximityprompt.Enabled = false
end
end)
script👆👆
Cant u rotate it?
@modern saffron add an attachment that is correctly facing in your tool then clone the world cframe of that attachment when you clone your ammo thing
What does it mean
How do i clone cframe
just set the cframe of your ammo thing to the cframe of the attachment
Sound very confusing😧
proximityprompt = script.Parent
local Ammovalue = script.Parent.Parent.Parent.Value
local clone = game.Workspace.CowAmmo
local speed = 500
proximityprompt.Triggered:Connect(function()
local part = clone:Clone()
local character = proximityprompt.Parent.Parent.Parent -- you just gotta find the character that uses the tool (it might be different for you)
local torso = character:WaitForChild("HumanoidRootPart")
part.Parent = workspace.BulletFolder
part.CFrame = proximityprompt.Parent.CFrame
part.Velocity = torso.CFrame.LookVector * speed
Ammovalue.Value = Ammovalue.Value - 1
if Ammovalue.Value == 0 then
proximityprompt.Enabled = false
end
end)
if it works let me know
if else lmk also
Erm actually it solved
** You are now Level 5! **
But thank you for the script i didnot expect that someone would write the script