So as i said in the title i need to place a new Instance inside of player's torso.This is how i've tried to do it but i can't locate the player inside the workspace
local ff = Instance.new("ForceField")
ff.Parent = game.Workspace.
ff.Visible = false
So as i said in the title i need to place a new Instance inside of player's torso.This is how i've tried to do it but i can't locate the player inside the workspace
local ff = Instance.new("ForceField")
ff.Parent = game.Workspace.
ff.Visible = false
Firstly, the following code should be a local script inside of StarterCharacterScripts
local player = game.Players.LocalPlayer
local character = player.Character
local ff = Instance.new("ForceField")
ff.Parent = character.Torso -- change Torso to UpperTorso or LowerTorso if you're using r15
ff.Visible = false
Each time the character spawns/respawns this code will run as the script reloads with the character.
The problem is i am trying to execute this script after it's parent has transfered it to a player,which means i cannot put it inside StarterCharacterScripts
So you're trying to put the script in the player? That makes no sense it would be better to do it my way..
but i need to do it after a certain function of it's parent script is done
You didn't give enough info in your question
There is a certain fruit which when eaten should give that force field to a player
sounds like something he took from Roblox's catalog :P
This discussion is preserved as it was. New answers, comments, and votes are closed.
4 comments
What player you need to find?
An owner of it's parent script
You want this to happen like a regular force field each time the player respawns?
There is a certain fruit which when eaten should give that force field to a player