This is only a snippet, but I'm getting an error on line 4. Worked before, but I replaced the model with a newer version and it broke.
function onTouched(Brick) if enabled == true then local Player = Brick.Parent:findFirstChild("Humanoid") local Character = game:GetService('Players'):GetPlayerFromCharacter(Player.Parent)
Well, first, your variables are kind of weird. You name the Humanoid variable 'Player', and the Player variable 'Character'. Anyways, you should try this:
function whenTouched(hit) if game.Players:GetPlayerFromCharacter(hit.Parent) then --If it's a player local character = hit.Parent local humanoid = character:FindFirstChild("Humanoid") local player = game.Players:GetPlayerFromCharacter(character) end end)
This way you make sure it's an actual player before defining variables.
"f" seems to be lowercase on line 3. Brick.Parent:FindFirstChild("Humanoid")