I get this error " Workspace.me.Script:2: attempt to index nil with ‘Character’
Use it with the task.wait(2) I added and it should work just fine
heres a snippet that will work for you
local function setForcefield(bool)
character.Forcefield.Enabled = bool
end
character.ChildAdded:Connect(function()
if character:FindFirstChild("Glock 17") then
setForcefield(true)
end
end)
-- do the same with the backpack, and also connect ChildRemoving
-- remember to set variables and create a forcefield inside the character when they are added.
if you go along with this idea, make it a local script. Local player does not work with server scripts.
yes use a local script
(character limit)
Just realised I didn’t used local script.
a local script wont even be the best if you damage the player on the server.
I don’t know did I see right, but when player Have Glock 17, he doesn’t need to have max health, if he have Glock 17, health should be normal, and if he doens’t have Glock 17, then he should have max health.
I don’t want to intrude on your conversation, but this is not a good route to take. You should not be using render stepped for this, or setting the players max health to the largest number.
I know what I’m doing. You are definitely intruding our conversation lol. You have to be trolling. I know how to use remote events. I can help him do it if he can explain exactly what he wants correctly
Yes I know, but it’s a huge script to make that only if player get shot, which I don’t know, and in my game you can only die if you get shoot so…
If you know what ER:LC is, something like that, if player is not armed he cant be killed, if he is armed he can be killed.
just saying that you definitely should not be doing it this way if you want your game to be unoptimized then go ahead
I will make this for you and send you the file so you can just ungroup it within your game. Give me 15 minutes please. Thank you
Hey, so I used roblox ai scripter and he made me script.
Ok but I just made everything for you. Use it. It works good. You have to ungroup everything where it says to ungroup it. Drag each folder into the area it belongs and ungroup.
Thank you so much! I will test it asap
Sounds great! Let me know how it works for you. I can send video tutorial if you need any help setting it up
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.