When I run the script, I get an error where it says that: humanoid is not a valid member of script
##Script:
local Player = game.Players.LocalPlayer
local char = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = char.Humanoid
local fire = Instance.new("Fire") -- making fire
fire.Parent = script.Parent -- putting it in the parent
fire.Heat = 10
fire.Size = 4
for i = 1, 100 do
script.Parent.Players.Humanoid:TakeDamage(0.1) -- making the player take damage
wait(0.1)
end
fire:Destroy() -- removing the fire and the script
script:Destroy()
Re-edited by JesseSong!
image https://www.linkpicture.com/q/Screenshot-2021-08-04-124957.png

23 comments
i dont know how to make this into lua
is the script in workspace?
no
Inside a part?
yes
its inside a model and its a server script
im not that knoledgeable on lua but i think that if its inside there it wont work so you can try to add a function on the event a player joins
inside a server script
like for example: game.Players.PlayerAdded:Connect(function(player) will create a function called player when the player is added and you can add information into "player"
the script is in a server script inside a server script hold on i'm putting a image
If the script is in serverscript doing script.Parent.Players wont work because they are sort of siblings for lack of a better term
what do i do then? move it to server script service?
how do i fix it?
No you can maybe move it to Workspace and change "script.Parent" to possibly "script.Parent.Parent" or change it to game.Workspace.Players
except im a bit confused where the script really is, where really is the script?
i have included a screenshot but which script do i move player damage or the script?
link image https://www.linkpicture.com/q/Screenshot-2021-08-04-124957.png
whats the script called "script" doing for you?
If its a serverscript, there is no LocalPlayer
the script is currently in this model https://www.linkpicture.com/q/Screenshot-2021-08-04-130655.png
the script i making the gaspump explodeable
check out JesseSong's response and do it
ok