i have a double jump script inside starterplayers
and I want to make it enable when touching the wall, then disables it one second later
but when I tested it, its not disabled and when I touched the wall it did nothing.
here’s the script:
local p = game.Players.LocalPlayer
local c = p.Character
c.REEE.disabled = true
script.Parent.Touched:connect(function(Hit)
if p then
c.REEE.disabled = false
wait(1)
c.REEE.disabled = true
end
end)
(I don’t find the script inside my character is that the reason?)
(btw its a local script inside the part does that have to do with anything?
assuming that the script is located inside the part
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild(“Humanoid”) then
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
end
end)
script.Parent.Touched:connect(function(Hit)
if Hit.Parent:FindFirstChild('Humanoid') then
local plr = game.Players:GetPlayerFromCharacter(Hit.Parent)
plr.Character.REEE.Disabled = false
wait(1)
plr.Character.REEE.Disabled = true
end
end)
i have it disabled cause i only want it to be flase when touching the part
make sure the server can see the REEE script, u can do so by pressing “Current server” in the home tab i think. Make sure the script also had time to load, try putting :WaitForChild(“REEE”)
it says inf yeild possible with reee and line 5 have problem
script.Parent.Touched:connect(function(Hit)
if Hit.Parent:FindFirstChild('Humanoid') then
local plr = game.Players:GetPlayerFromCharacter(Hit.Parent)
local R = plr.Character:WaitForChild("REEE")
R.Disabled = false
wait(1)
R.Disabled = true
end
end)
local part = script.Parent
part.Touched:Connect(function(hit)
local plr = hit.Parent
local plrs = game.Players:GetPlayerFromCharacter(hit)
local plrss = plrs:WaitForChild("REEE")
plrss.disabled = true
if plrs ~= nil then
plrss.disabled = false
wait(1)
plrss.disabled = true
end
end)
20:31:42.589 Script ‘Workspace.Part.Script’, Line 6 - Studio - Script:6
20:31:42.589 Stack End - Studio
20:31:42.686 Workspace.Part.Script:6: attempt to index nil with ‘WaitForChild’ - Server - Script:6
20:31:42.687 Stack Begin - Studio
20:31:42.687 Script ‘Workspace.Part.Script’, Line 6 - Studio - Script:6
20:31:42.687 Stack End - Studio
20:31:42.688 Workspace.Part.Script:6: attempt to index nil with ‘WaitForChild’ - Server - Script:6
20:31:42.688 Stack Begin - Studio
20:31:42.688 Script ‘Workspace.Part.Script’, Line 6 - Studio - Script:6
20:31:42.688 Stack End - Studio
20:31:42.689 Workspace.Part.Script:6: attempt to index nil with ‘WaitForChild’ - Server - Script:6
20:31:42.689 Stack Begin - Studio
20:31:42.690 Script ‘Workspace.Part.Script’, Line 6 - Studio - Script:6
20:31:42.690 Stack End - Studio
20:31:42.690 Workspace.Part.Script:6: attempt to index nil with ‘WaitForChild’ - Server - Script:6
20:31:42.690 Stack Begin - Studio
20:31:42.690 Script ‘Workspace.Part.Script’, Line 6 - Studio - Script:6
20:31:42.690 Stack End - Studio
20:31:43.754 Workspace.Part.Script:6: attempt to index nil with ‘WaitForChild’ - Server - Script:6
20:31:43.754 Stack Begin - Studio
20:31:43.754 Script ‘Workspace.Part.Script’, Line 6 - Studio - Script:6
20:31:43.755 Stack End - Studio
20:31:44.053 Workspace.Part.Script:6: attempt to index nil with ‘WaitForChild’ - Server - Script:6
20:31:44.054 Stack Begin - Studio
20:31:44.054 Script ‘Workspace.Part.Script’, Line 6 - Studio - Script:6
20:31:44.055 Stack End - Studio
20:31:44.160 Workspace.Part.Script:6: attempt to index nil with ‘WaitForChild’ - Server - Script:6
20:31:44.160 Stack Begin - Studio
20:31:44.160 Script ‘Workspace.Part.Script’, Line 6 - Studio - Script:6
20:31:44.161 Stack End - Studio
20:31:44.822 Workspace.Part.Script:6: attempt to index nil with ‘WaitForChild’ - Server - Script:6
20:31:44.822 Stack Begin - Studio
20:31:44.822 Script ‘Workspace.Part.Script’, Line 6 - Studio - Script:6
20:31:44.823 Stack End - Studio
20:31:44.823 Workspace.Part.Script:6: attempt to index nil with ‘WaitForChild’ - Server - Script:6
20:31:44.823 Stack Begin - Studio
20:31:44.825 Script ‘Workspace.Part.Script’, Line 6 - Studio - Script:6
20:31:44.825 Stack End - Studio
20:31:44.825 Workspace.Part.Script:6: attempt to index nil with ‘WaitForChild’ - Server - Script:6
20:31:44.826 Stack Begin - Studio
20:31:44.826 Script ‘Workspace.Part.Script’, Line 6 - Studio - Script:6
20:31:44.826 Stack End - Studio
20:31:44.826 Workspace.Part.Script:6: attempt to index nil with ‘WaitForChild’ - Server - Script:6
20:31:44.826 Stack Begin - Studio
20:31:44.826 Script ‘Workspace.Part.Script’, Line 6 - Studio - Script:6
20:31:44.827 Stack End - Studio
20:31:44.827 Workspace.Part.Script:6: attempt to index nil with ‘WaitForChild’ - Server - Script:6
20:31:44.827 Stack Begin - Studio
20:31:44.827 Script ‘Workspace.Part.Script’, Line 6 - Studio - Script:6
20:31:44.827 Stack End - Studio
20:31:47.170 Workspace.Part.Script:6: attempt to index nil with ‘WaitForChild’ - Server - Script:6
20:31:47.171 Stack Begin - Studio
20:31:47.171 Script ‘Workspace.Part.Script’, Line 6 - Studio - Script:6
20:31:47.171 Stack End - Studio
20:31:47.274 Workspace.Part.Script:6: attempt to index nil with ‘WaitForChild’ - Server - Script:6
20:31:47.274 Stack Begin - Studio
20:31:47.274 Script ‘Workspace.Part.Script’, Line 6 - Studio - Script:6
20:31:47.274 Stack End - Studio