How To Make A Force Field Invisible??


  • Exactly what the title states. How would one go about making a force field transparent?
    Or an alternative with no visual effects that keeps a player from being damaged..
    The Force Field is not for that of spawn, but for that of a certain area as you can see in the following script.

    This is the script i'm using. How would i incorporate it into this?

    function WalkingOn(connected)
    if not connected.Parent:FindFirstChild("Humanoid") then return end
    if connected.Parent:FindFirstChild("ForceField") then return end
    Instance.new("ForceField", connected.Parent)
    end
    script.Parent.Touched:connect(WalkingOn)

    function DoneWalkingOn(connected)
    if not connected.Parent:FindFirstChild("Humanoid") then return end
    if connected.Parent:FindFirstChild("ForceField") then
    connected.Parent.ForceField:Destroy()
    end
    end
    script.Parent.TouchEnded:connect(DoneWalkingOn)


  • Create a boolvalue, place it in player, make it true. Then make if statements to check if player has it and its true so that the block the player is touching wont kill him/her.


  • Sure, that would work.


  • If it's for when you spawn in a game then take the "spawn part" or whatever go to "properties" of it then make the forcefield transparent.


  • @ThatHertz I'm pretty sure that isn't possible, that's why this question was asked.


  • @ThatHertz Adjusting the transparency of a forcefield isn't possible because there is nothing in its properties where you can adjust it.


  • local ff = Instance.new('ForceField')
    ff.Name = 'FF'
    ff.Visible = false -- <-That there
    ff.Parent = WHEREVER
    

  • @TheAlphaStigma

    local ff = Instance.new('ForceField')
    ff.Name = 'FF'
    ff.Visible = false -- <-That there
    ff.Parent = WHEREVER

    How to incorporate this into the following script below?

    function WalkingOn(connected)
    if not connected.Parent:FindFirstChild("Humanoid") then return end
    if connected.Parent:FindFirstChild("ForceField") then return end
    Instance.new("ForceField", connected.Parent)
    end
    script.Parent.Touched:connect(WalkingOn)

    function DoneWalkingOn(connected)
    if not connected.Parent:FindFirstChild("Humanoid") then return end
    if connected.Parent:FindFirstChild("ForceField") then
    connected.Parent.ForceField:Destroy()
    end
    end
    script.Parent.TouchEnded:connect(DoneWalkingOn)


  • @KarutoPurotekuta Replace it where your script adds the force field. :P In other words line 4 of the code given.


  • @TheAlphaStigma

    It should look like this, no?
    If so it doesn't work. Not really sure what to do here.

    function WalkingOn(connected)
    if not connected.Parent:FindFirstChild("Humanoid") then return end
    if connected.Parent:FindFirstChild("ForceField") then return end
    local ff = Instance.new('ForceField')
    ff.Name = 'FF'
    ff.Visible = false -- <-That there
    ff.Parent = WHEREVER
    end
    script.Parent.Touched:connect(WalkingOn)

    function DoneWalkingOn(connected)
    if not connected.Parent:FindFirstChild("Humanoid") then return end
    if connected.Parent:FindFirstChild("ForceField") then
    connected.Parent.ForceField:Destroy()
    end
    end
    script.Parent.TouchEnded:connect(DoneWalkingOn)


  • Yeah! :D


  • @KarutoPurotekuta Except that you need to change WHEREVER to where you want the force field to go. :P

Log in to reply
 

Looks like your connection to Scripting Helpers was lost, please wait while we try to reconnect.