Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I change the spawn point of the "Weapon" ?

Asked by 9 years ago

Hello, I am trying to get a pad to where when a character walks into it a weapon spawns for the character to pick up. I hope to have it dropping only 1 priced weapon that they can buy. Anyways I can't seem to get the item to spawn where I want it to. It always spawns in the middle of the map or doesn't spawn at all when I try to fix it. This is the code for the clone system. If you need anything else just ask. :)

--(Peanutthedestoyer)


local SpeedBoost = script.Parent
local Weapon = game.ServerStorage.Weapon


local function steppedOn(part)
    local parent = part.Parent
    if game.Players:GetPlayerFromCharacter(parent) then
        local fireballcopy = Weapon:Clone()
        fireballcopy.Parent = game.Workspace
end 
end

SpeedBoost.Touched:connect(steppedOn)
0
fireballcopy.Position = SpeedBoost.Position + Vector3.new(0,3,0), or fireballcopy.CFrame = parent.Torso.Position TheDeadlyPanther 2460 — 9y
0
06:49:21.175 - Position is not a valid member of Tool 06:49:21.176 - Script 'Workspace.SpeedBoost.Script', Line 13 06:49:21.177 - Stack End Peanutthedestoyer 0 — 9y
0
06:50:21.051 - CFrame is not a valid member of Tool 06:50:21.051 - Script 'Workspace.SpeedBoost.Script', Line 13 06:50:21.052 - Stack End These are both errors that pop up when I tried using the codes on line 13. Did I put them in the wrong spot? I tried playing with them a bit but still came up with the same or similar errors. Peanutthedestoyer 0 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

Never mind, I found the error. The sword had a preset spawn point set up. Though thank you for the help. :D

Ad

Answer this question