My script says "Hot/Cold s not a valid member of RBXScriptSignal" when I touch a temperature part. I do not know what an RBXScriptSignal is. It only ticks once then it completely breaks. (Literally, 1 time only not for each) Any help? Thanks if you do help. Script:
wait(1)
local plr = game.Players.LocalPlayer
local Char = plr.Character
local Hot = game.Workspace.Temps.Hot
local Cold = game.Workspace.Temps.Cold
local Temp = script.Parent.Parent.Temp
local debounce = false
wait(1)
-- // Hot \\ --
game.Players.LocalPlayer:WaitForChild("Temp")
Hot.Touched:Connect(function(hit)
if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") and not debounce then
debounce = true
repeat
wait(1)
game.Players.LocalPlayer.Temp.Value = Temp.Value +1
until hit.TouchEnded.Hot
wait(1)
debounce = false
wait(1)
debounce = true
end
end)
wait(1)
-- // Cold \\ --
game.Players.LocalPlayer:WaitForChild("Temp")
Cold.Touched:Connect(function(hit)
if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") and not debounce then
debounce = true
repeat
wait(1)
game.Players.LocalPlayer.Temp.Value = Temp.Value -1
until hit.TouchEnded.Cold
wait(1)
debounce = false
wait(1)
debounce = true
end
end)
while true do
wait(0.001)
-- Frozen Death
if game.Players.LocalPlayer.Temp.Value <= -400 then
local k = Instance.new("Sound")
k.SoundId = "rbxasset://747238556"
local children = Char:GetChildren()
for i = 1, #children do
local child = children[i]
if children:IsA("BasePart") or children:IsA("MeshPart") or children:IsA("UnionOperation") or children:IsA("Part") or children:IsA("Accessory") then
children.Anchored = true
if children:IsA("BodyColors") then
HeadColor3 = Color3.fromRGB(34, 165, 205)
LeftArmColor3 = Color3.fromRGB(34, 165, 205)
LeftLegColor3 = Color3.fromRGB(34, 165, 205)
HeadColor3 = Color3.fromRGB(34, 165, 205)
RightArmColor3 = Color3.fromRGB(34, 165, 205)
RightLegColor3 = Color3.fromRGB(34, 165, 205)
TorsoColor3 = Color3.fromRGB(34, 165, 205)
k:Play()
if children:IsA("Decal") then
Transparency = 1
wait(7)
--Char.Humanoid.Health = 0
--Char.Humanoid.MaxHealth = 0
wait(2)
Temp.Value = 0
end
end
end
end
end
end
