Whatsup scripters,
I wanted to make a forcefield part that would just give you a forcefield once you touch the part, which is pretty self-explanatory, but I stumbled onto a bug that puts the forcefield in the middle of the map instead of in the torso. I told the script to parent the forcefield in the torso, but it appears to bug.
Could anyone help?
Thanks in advance.
local forcefield = Instance.new("ForceField")
local debounce = false
if debounce == false then
debounce = true
script.Parent.Touched:Connect(function(hit)
if game.Players:GetPlayerFromCharacter(hit.Parent) then
if not hit.Parent.Torso:FindFirstChild("forcefield") then
script.Parent.Highlight.Enabled = true
forcefield.Parent = hit.Parent:FindFirstChild("Torso")
end
end
task.wait(5)
debounce = false
end)
end