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

How do I make this forcefield appear only on me, and how do I make it infinite?

Asked by 7 years ago

I wanna troll in my game ;) Here's my script so far:

local player = game.Players.LocalPlayer
if player == izanagi456 then
game.Players.PlayerAdded:Connect(function(p) 
    p.CharacterAdded:Connect(function(c) 
        local ff = Instance.new("ForceField")
        ff.Visible = false
        ff.Parent = c
end
)
end
)
end

1 answer

Log in to vote
0
Answered by 7 years ago

Please provide explanation with your answers. Simply posting code does not spread knowledge of integral scripting processes which helps people understand the logic and reasoning behind your answer.

You would just check if the name was yours and then add the ForceField Alot of your code was wrong too. Put this in a normal script inside ServerScriptService.


game.Players.PlayerAdded:Connect(function(p) p.CharacterAdded:Connect(function(c) if p.Name = "Your name here" then local ff = Instance.new("ForceField") ff.Visible = false ff.Parent = c end end) end)
0
oh k thanks izanagi456 4 — 7y
Ad

Answer this question